use strpbrk(3) to search for characters from a given set
[git/debian.git] / t / t0029-core-unsetenvvars.sh
blob24ce46a6ea15cfcbf99d4affac625c61b2dd7286
1 #!/bin/sh
3 test_description='test the Windows-only core.unsetenvvars setting'
5 . ./test-lib.sh
7 if ! test_have_prereq MINGW
8 then
9 skip_all='skipping Windows-specific tests'
10 test_done
13 test_expect_success 'setup' '
14 mkdir -p "$TRASH_DIRECTORY/.git/hooks" &&
15 write_script "$TRASH_DIRECTORY/.git/hooks/pre-commit" <<-\EOF
16 echo $HOBBES >&2
17 EOF
20 test_expect_success 'core.unsetenvvars works' '
21 HOBBES=Calvin &&
22 export HOBBES &&
23 git commit --allow-empty -m with 2>err &&
24 grep Calvin err &&
25 git -c core.unsetenvvars=FINDUS,HOBBES,CALVIN \
26 commit --allow-empty -m without 2>err &&
27 ! grep Calvin err
30 test_done