Skip to content

Commit 05b70ec

Browse files
committed
test(diff_env): use r"\w" in a regular expression
1 parent 18ab3b7 commit 05b70ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/t/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,9 @@ def diff_env(before: List[str], after: List[str], ignore: str):
433433
if not re.search(r"^(---|\+\+\+|@@ )", x)
434434
# Ignore variables expected to change:
435435
and not re.search(
436-
"^[-+](_|PPID|BASH_REMATCH|_bash_completion_test_[a-zA-Z_0-9]*)=",
436+
r"^[-+](_|PPID|BASH_REMATCH|_bash_completion_test_\w+)=",
437437
x,
438+
re.ASCII,
438439
)
439440
# Ignore likely completion functions added by us:
440441
and not re.search(r"^\+declare -f _.+", x)

0 commit comments

Comments
 (0)