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.") +}