1// SPDX-License-Identifier: MIT
2
3▶package main
4
5import (
· · ·
18// The tests in this file guard against regressions to pre-existing behaviour
19// introduced by the config-dotfile work (spec/01-config-dotfile). They focus on
20▶// functionality that existed before the feature and could have been silently
21// changed by the registerFlags refactor, the shared @file tokenizer and the
22// config discovery/merge pipeline - cases the feature's own tests do not cover.
· · ·
31// union must keep the defaults as a non-removable safety net. .svn is the canary:
32// nothing else skips it, so if preservation breaks it reappears in the output.
33▶func TestRegressionExcludeDirPreservesDefaults(t *testing.T) {
34 dir := t.TempDir()
35 layout := map[string]string{".svn": "x.go", "vendor": "y.go", "keep": "z.go"}
· · ·
62// lockfile defaults. package-lock.json is the canary - before the fix pflag's
63// replace-on-first-Set would have let it through.
64▶func TestRegressionExcludeFilePreservesDefaults(t *testing.T) {
65 dir := t.TempDir()
66 files := map[string]string{
· · ·
67▶ "main.go": "package main\n",
68 "package-lock.json": "{\"a\":1}\n",
69 "myignore.txt": "hello\n",
+ 40 more matches in this file