esync

Directory watching and remote syncing
Log | Files | Refs | README | LICENSE

commit f057007c55c1f823ef7b8641f1773c121e254ee9
parent 4ffb53b16262adb37262e4f101ddb8ab25534386
Author: Erik Loualiche <[email protected]>
Date:   Sun,  8 Mar 2026 15:22:52 -0400

test: assert named excludes precede catch-all in include mode

Co-Authored-By: Claude Opus 4.6 <[email protected]>

Diffstat:
Minternal/syncer/syncer_test.go | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/internal/syncer/syncer_test.go b/internal/syncer/syncer_test.go @@ -357,6 +357,17 @@ func TestBuildCommand_IncludePatterns(t *testing.T) { if lastInclude >= catchAllExclude { t.Errorf("--include rules must come before --exclude=* catch-all") } + + // Verify named excludes come before catch-all + gitExclude := -1 + for i, a := range cmd { + if a == "--exclude=.git" { + gitExclude = i + } + } + if gitExclude >= catchAllExclude { + t.Errorf("--exclude=.git must come before --exclude=* catch-all") + } } // ---------------------------------------------------------------------------