diff options
Diffstat (limited to 'internal/plan/hostile_test.go')
| -rw-r--r-- | internal/plan/hostile_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/plan/hostile_test.go b/internal/plan/hostile_test.go index a2f2bfe..13c2afd 100644 --- a/internal/plan/hostile_test.go +++ b/internal/plan/hostile_test.go @@ -48,6 +48,11 @@ func TestBuildRefusesDotDotFromPlaceholder(t *testing.T) { if s := step("/w/{1}x"); s.Skip != "" || s.Dst != "/w/..x/x.pdf" { t.Errorf("..x: Skip = %q, Dst = %q", s.Skip, s.Dst) } + // "{{" is a literal brace, not a placeholder: the text names /w/{x}, and + // a capture may not climb out of it (triage 28b). + if s := step("/w/{{x}}/{1}/in"); s.Skip != `destination "/w/{x}/../in" leaves /w/{x} through a placeholder` { + t.Errorf("literal braces: Skip = %q, Dst = %q", s.Skip, s.Dst) + } } // TestBuildKeepsPlaceholdersInsideTheirDirectory: a capture of "~", an |
