]> git.ipfire.org Git - thirdparty/git.git/blame - t/t0029-core-unsetenvvars.sh
Start the 2.46 cycle
[thirdparty/git.git] / t / t0029-core-unsetenvvars.sh
CommitLineData
0e218f91
JS
1#!/bin/sh
2
3test_description='test the Windows-only core.unsetenvvars setting'
4
c150064d 5TEST_PASSES_SANITIZE_LEAK=true
0e218f91
JS
6. ./test-lib.sh
7
8if ! test_have_prereq MINGW
9then
10 skip_all='skipping Windows-specific tests'
11 test_done
12fi
13
14test_expect_success 'setup' '
bef805b7 15 test_hook --setup pre-commit <<-\EOF
0e218f91
JS
16 echo $HOBBES >&2
17 EOF
18'
19
20test_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
28'
29
30test_done