shithub: hugo

ref: 5b19a26556cc7a533b0e2559e5f1740b892a2f53
dir: /commands/new_test.go/

View raw version
package commands

import (
	"github.com/stretchr/testify/assert"
	"path/filepath"
	"testing"
)

// Issue #1133
func TestNewContentPathSectionWithForwardSlashes(t *testing.T) {
	p, s := newContentPathSection("/post/new.md")
	assert.Equal(t, filepath.FromSlash("/post/new.md"), p)
	assert.Equal(t, "post", s)
}