aboutsummaryrefslogtreecommitdiff
path: root/internal/engine/match_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:45:23 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:45:23 +0200
commit97c8164bc81e0a438dab92d7244485005dac4ff2 (patch)
tree08d657f8b92a6539259b6aa8f08b0e9ef8cc6710 /internal/engine/match_test.go
parent166565025832c8a8faf7397766aeaa878980dd2d (diff)
downloadkrino-97c8164bc81e0a438dab92d7244485005dac4ff2.tar.gz
krino-97c8164bc81e0a438dab92d7244485005dac4ff2.zip
literal braces are text, not placeholders, for containment and walk exclusion
Diffstat (limited to 'internal/engine/match_test.go')
-rw-r--r--internal/engine/match_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/engine/match_test.go b/internal/engine/match_test.go
index 477e06f..f2a01bc 100644
--- a/internal/engine/match_test.go
+++ b/internal/engine/match_test.go
@@ -267,6 +267,7 @@ func TestExcludeDirs(t *testing.T) {
(rule "r7" (move "` + absDest + `"))
(rule "r8" (copy "Backup"))
(rule "r9" (rename "x-{name}"))
+(rule "r10" (move "Lit/{{a}}/{mtime:%Y}"))
`
main := writeConfig(t, h, `(include "dl")`, map[string]string{"dl": conf})
e, errs := Load(main)
@@ -285,6 +286,7 @@ func TestExcludeDirs(t *testing.T) {
absDest, // r7: absolute, already inside root
filepath.Join(root, "Backup"), // r8: copy counts like move
// r9 rename "x-{name}": rename is never a destination.
+ filepath.Join(root, "Lit", "{a}"), // r10: "{{a}}" is literal text
}
if !reflect.DeepEqual(got, want) {
t.Fatalf("excludeDirs =\n%v\nwant\n%v", got, want)