Raw
1 #!/bin/sh
2
3 test_description='test the Windows-only core.unsetenvvars setting'
4
5 . ./test-lib.sh
6
7 if ! test_have_prereq MINGW
8 then
9 skip_all='skipping Windows-specific tests'
10 test_done
11 fi
12
13 test_expect_success 'setup' '
14 test_hook --setup pre-commit <<-\EOF
15 echo $HOBBES >&2
16 EOF
17 '
18
19 test_expect_success 'core.unsetenvvars works' '
20 HOBBES=Calvin &&
21 export HOBBES &&
22 git commit --allow-empty -m with 2>err &&
23 test_grep Calvin err &&
24 git -c core.unsetenvvars=FINDUS,HOBBES,CALVIN \
25 commit --allow-empty -m without 2>err &&
26 test_grep ! Calvin err
27 '
28
29 test_done