Skip to content

Commit b6de491

Browse files
committed
fix(test/t/conftest.py): include the output of pwd to the env check
1 parent c55ee7f commit b6de491

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/config/bashrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ add_comp_wordbreak_char()
6464

6565
_comp__test_get_env()
6666
{
67+
# Note: PWD is supposed to reflect the current working directory, but the
68+
# real current working directory of the process can be different, e.g. when
69+
# PWD is manually altered. Therefore, we also check the result of $(pwd)
70+
# explicitly via a new variable `_comp_test_pwd`.
71+
local _comp_test_pwd=$(pwd)
72+
6773
(
6874
# Do not output the state of test variables "_comp__test_+([0-9])_*"
6975
# and internal mutable variables "_comp_*_mut_*".

0 commit comments

Comments
 (0)