mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 00:16:57 +00:00
test(util): update exclude glob to data/*.log for slash-aware matching
Bare `*.log` no longer crosses `/` after #1732, so the exclude glob in the search_files parametrization is anchored to data/ to keep excluding data/b.log. Matches the repo convention that `**` is required to cross directory boundaries (see test_search_files_glob_patterns).
This commit is contained in:
1 parent
70d32f2453
commit
52cf8552a0
1 file changed
+2
-1
@@ -317,7 +317,8 @@ class TestSearchFiles:
|
||||
(["a.py", "b.txt", "c.py"], "match", "*.py", "c.*", ["a.py"], "Include .py, exclude c.*"),
|
||||
# Directory matching - Using pathspec patterns
|
||||
(["main.c", "test/main.c"], "match", "test/*", None, ["test/main.c"], "Include files in test/ subdir"),
|
||||
(["data/a.csv", "data/b.log"], "match", "data/*", "*.log", ["data/a.csv"], "Include data/*, exclude *.log"),
|
||||
# A bare `*.log` no longer crosses `/` (see #1732); use `data/*.log` to exclude within data/.
|
||||
(["data/a.csv", "data/b.log"], "match", "data/*", "data/*.log", ["data/a.csv"], "Include data/*, exclude data/*.log"),
|
||||
(["src/a.py", "tests/b.py"], "match", "src/**", "tests/**", ["src/a.py"], "Include src/**, exclude tests/**"),
|
||||
(["src/mod/a.py", "tests/b.py"], "match", "**/*.py", "tests/**", ["src/mod/a.py"], "Include **/*.py, exclude tests/**"),
|
||||
(["file.py", "dir/file.py"], "match", "dir/*.py", None, ["dir/file.py"], "Include files directly in dir"),
|
||||
|
||||
Reference in new issue
Block a user