diff options
Diffstat (limited to 'hugolib/case_insensitive_test.go')
-rw-r--r-- | hugolib/case_insensitive_test.go | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/hugolib/case_insensitive_test.go b/hugolib/case_insensitive_test.go index a8616ab06..42b9d7ef6 100644 --- a/hugolib/case_insensitive_test.go +++ b/hugolib/case_insensitive_test.go @@ -14,7 +14,6 @@ package hugolib import ( - "fmt" "path/filepath" "testing" @@ -232,76 +231,3 @@ Page2: {{ $page2.Params.ColoR }} "index2|Site: yellow|", ) } - -// TODO1 -func TestCaseInsensitiveConfigurationForAllTemplateEngines(t *testing.T) { - t.Parallel() - - noOp := func(s string) string { - return s - } - - for _, config := range []struct { - suffix string - templateFixer func(s string) string - }{ - //{"amber", amberFixer}, - {"html", noOp}, - //{"ace", noOp}, - } { - doTestCaseInsensitiveConfigurationForTemplateEngine(t, config.suffix, config.templateFixer) - - } - -} - -func doTestCaseInsensitiveConfigurationForTemplateEngine(t *testing.T, suffix string, templateFixer func(s string) string) { - c := qt.New(t) - mm := afero.NewMemMapFs() - - caseMixingTestsWriteCommonSources(t, mm) - - cfg, err := LoadConfigDefault(mm) - c.Assert(err, qt.IsNil) - - fs := hugofs.NewFrom(mm, cfg) - - th := newTestHelper(cfg, fs, t) - - t.Log("Testing", suffix) - - templTemplate := ` -p - | - | Page Colors: {{ .Params.CoLOR }}|{{ .Params.Colors.Blue }} - | Site Colors: {{ .Site.Params.COlOR }}|{{ .Site.Params.COLORS.YELLOW }} - | {{ .Content }} - -` - - templ := templateFixer(templTemplate) - - t.Log(templ) - - writeSource(t, fs, filepath.Join("layouts", "_default", fmt.Sprintf("single.%s", suffix)), templ) - - sites, err := NewHugoSites(deps.DepsCfg{Fs: fs, Cfg: cfg}) - - if err != nil { - t.Fatalf("Failed to create sites: %s", err) - } - - err = sites.Build(BuildCfg{}) - - if err != nil { - t.Fatalf("Failed to build sites: %s", err) - } - - th.assertFileContent(filepath.Join("public", "nn", "sect1", "page1", "index.html"), - "Page Colors: red|heavenly", - "Site Colors: green|yellow", - "Shortcode Page: red|heavenly", - "Shortcode Site: green|yellow", - ) - -} |