summaryrefslogtreecommitdiffstats
path: root/hugolib/resource_chain_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-02-09 14:08:01 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-02-09 15:41:32 +0100
commitb06c2103b84dde1d757bf8efe894014b678f460f (patch)
tree237a6de398116b89588a72c4a0c16980ca077277 /hugolib/resource_chain_test.go
parentd22f7795c721272b03f49ee41211adf054931e53 (diff)
templates: Port integration test to its package
Diffstat (limited to 'hugolib/resource_chain_test.go')
-rw-r--r--hugolib/resource_chain_test.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go
index 5d57b2a16..39f867570 100644
--- a/hugolib/resource_chain_test.go
+++ b/hugolib/resource_chain_test.go
@@ -713,32 +713,6 @@ JSON: {{ $json.RelPermalink }}: {{ $json.Content }}
"JSONS: 2", "/jsons/data1.json: json1 content")
}
-func TestExecuteAsTemplateWithLanguage(t *testing.T) {
- b := newMultiSiteTestDefaultBuilder(t)
- indexContent := `
-Lang: {{ site.Language.Lang }}
-{{ $templ := "{{T \"hello\"}}" | resources.FromString "f1.html" }}
-{{ $helloResource := $templ | resources.ExecuteAsTemplate (print "f%s.html" .Lang) . }}
-Hello1: {{T "hello"}}
-Hello2: {{ $helloResource.Content }}
-LangURL: {{ relLangURL "foo" }}
-`
- b.WithTemplatesAdded("index.html", indexContent)
- b.WithTemplatesAdded("index.fr.html", indexContent)
-
- b.Build(BuildCfg{})
-
- b.AssertFileContent("public/en/index.html", `
-Hello1: Hello
-Hello2: Hello
-`)
-
- b.AssertFileContent("public/fr/index.html", `
-Hello1: Bonjour
-Hello2: Bonjour
-`)
-}
-
func TestResourceChainPostCSS(t *testing.T) {
if !htesting.IsCI() {
t.Skip("skip (relative) long running modules test when running locally")