From 52cf8552a023f10ae56e543cb6d4c989dd956892 Mon Sep 17 00:00:00 2001 From: arimu1 <19286898+arimu1@users.noreply.github.com> Date: Wed, 22 Jul 2026 22:28:55 +0700 Subject: [PATCH] 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). --- test/serena/test_text_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/serena/test_text_utils.py b/test/serena/test_text_utils.py index 7d8074eb..801a19d1 100644 --- a/test/serena/test_text_utils.py +++ b/test/serena/test_text_utils.py @@ -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"),