aboutsummaryrefslogtreecommitdiffhomepage
path: root/create/content_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'create/content_test.go')
-rw-r--r--create/content_test.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/create/content_test.go b/create/content_test.go
index f43d3a5f4..37dbf98bd 100644
--- a/create/content_test.go
+++ b/create/content_test.go
@@ -14,6 +14,7 @@
package create_test
import (
+ "fmt"
"os"
"path/filepath"
"strings"
@@ -23,8 +24,6 @@ import (
"github.com/gohugoio/hugo/hugolib"
- "fmt"
-
"github.com/gohugoio/hugo/hugofs"
qt "github.com/frankban/quicktest"
@@ -35,7 +34,6 @@ import (
)
func TestNewContent(t *testing.T) {
-
cases := []struct {
kind string
path string
@@ -59,7 +57,8 @@ func TestNewContent(t *testing.T) {
`title = "GO"`,
"{{< myshortcode >}}",
"{{% myshortcode %}}",
- "{{</* comment */>}}\n{{%/* comment */%}}"}}, // shortcodes
+ "{{</* comment */>}}\n{{%/* comment */%}}",
+ }}, // shortcodes
}
for i, cas := range cases {
@@ -140,7 +139,6 @@ i18n: {{ T "hugo" }}
c.Assert(create.NewContent(h, "my-theme-bundle", "post/my-theme-post"), qt.IsNil)
cContains(c, readFileFromFs(t, fs.Source, filepath.Join("content", "post/my-theme-post/index.md")), `File: index.md`, `Site Lang: en`, `Name: My Theme Post`, `i18n: Hugo Rocks!`)
cContains(c, readFileFromFs(t, fs.Source, filepath.Join("content", "post/my-theme-post/resources/hugo1.json")), `hugo1: {{ printf "no template handling in here" }}`)
-
}
func initFs(fs afero.Fs) error {
@@ -248,7 +246,6 @@ func readFileFromFs(t *testing.T, fs afero.Fs, filename string) string {
}
func newTestCfg(c *qt.C, mm afero.Fs) (*viper.Viper, *hugofs.Fs) {
-
cfg := `
theme = "mytheme"
@@ -281,5 +278,4 @@ other = "Hugo Rokkar!"`), 0755), qt.IsNil)
c.Assert(err, qt.IsNil)
return v, hugofs.NewFrom(mm, v)
-
}