aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/template_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/template_test.go')
-rw-r--r--hugolib/template_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/hugolib/template_test.go b/hugolib/template_test.go
index 1c60a88b3..a610b4d59 100644
--- a/hugolib/template_test.go
+++ b/hugolib/template_test.go
@@ -706,3 +706,17 @@ a: {{ $a }}
b.AssertFileContent("public/index.html", `a: [a b c]`)
}
+
+func TestOverrideInternalTemplate(t *testing.T) {
+ files := `
+-- hugo.toml --
+baseURL = "https://example.org"
+-- layouts/index.html --
+{{ template "_internal/google_analytics_async.html" . }}
+-- layouts/_internal/google_analytics_async.html --
+Overridden.
+`
+ b := Test(t, files)
+
+ b.AssertFileContent("public/index.html", "Overridden.")
+}