summaryrefslogtreecommitdiff
path: root/internal/tests
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2022-05-29 15:03:51 -0400
committerDave Henderson <dhenderson@gmail.com>2022-05-30 14:06:32 -0400
commitc0b93d7ebdfd27badbb41eb62ca0bd77b0252308 (patch)
tree2f3b3e17023f4819cf69dee8953ea44463588bae /internal/tests
parent9ae9a6a5182342f775383646058807222947f483 (diff)
Support URLs for nested templates
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'internal/tests')
-rw-r--r--internal/tests/integration/nested_templates_test.go8
1 files changed, 8 insertions, 0 deletions
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
@@ -38,4 +38,12 @@ func TestNestedTemplates(t *testing.T) {
{{ 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 ")
}