aboutsummaryrefslogtreecommitdiff
path: root/internal/plan
diff options
context:
space:
mode:
Diffstat (limited to 'internal/plan')
-rw-r--r--internal/plan/fuzz_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/plan/fuzz_test.go b/internal/plan/fuzz_test.go
index b17d3c4..c7261ec 100644
--- a/internal/plan/fuzz_test.go
+++ b/internal/plan/fuzz_test.go
@@ -25,6 +25,11 @@ func FuzzExpand(f *testing.F) {
for _, s := range []string{"{name}", "{stem}{ext}", "{mtime:%Y/%m}", "{1}_{2}", "{{literal}}", "{", "}", "{now:%", "{0}", "{9}", "{99999999999999999999}"} {
f.Add(s, "a.b.pdf")
}
+ // Seeds that try to leave the destination, so plain go test checks
+ // containment too: a ".." capture, a "~" name, one below a literal.
+ f.Add("{2}", "a.pdf")
+ f.Add("Out/{2}/{1}", "a.pdf")
+ f.Add("{name}/x", "~")
f.Fuzz(func(t *testing.T, tmpl, name string) {
facts := Facts{
Name: name,