From c0b93d7ebdfd27badbb41eb62ca0bd77b0252308 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 29 May 2022 15:03:51 -0400 Subject: Support URLs for nested templates Signed-off-by: Dave Henderson --- internal/tests/integration/nested_templates_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/tests') diff --git a/internal/tests/integration/nested_templates_test.go b/internal/tests/integration/nested_templates_test.go index 07fdb3f1..aadd412f 100644 --- a/internal/tests/integration/nested_templates_test.go +++ b/internal/tests/integration/nested_templates_test.go @@ -35,6 +35,14 @@ func TestNestedTemplates(t *testing.T) { o, e, err = cmd(t, "-t", "templates/", "-i", `{{ template "templates/one.t" "one"}} +{{ template "templates/two.t" "two"}}`). + withDir(tmpDir.Path()).run() + assertSuccess(t, o, e, err, "one\n1: two 2: two ") + + // referencing a dir without a trailing / is undocumented, but works + // currently - I don't want to break it... + o, e, err = cmd(t, "-t", "templates", + "-i", `{{ template "templates/one.t" "one"}} {{ template "templates/two.t" "two"}}`). withDir(tmpDir.Path()).run() assertSuccess(t, o, e, err, "one\n1: two 2: two ") -- cgit v1.2.3