Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Droneaud <ydroneaud@opteya.com>2013-03-25 01:06:05 +0400
committerJunio C Hamano <gitster@pobox.com>2013-03-25 19:50:53 +0400
commitff73aa405fdbaa1073b4ada09ba3c151a255d826 (patch)
treefe5a2871f5fe3acb0f87bcde0ceb88b43b845dac /t/t4034-diff-words.sh
parentaac6c2f4bcea6bd371ef8b25edb991673a14d5b3 (diff)
t4034: use test_config/test_unconfig to set/unset git config variables
Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Additionally, instead of git config <key> "" or git config --unset <key> uses test_unconfig <key> The latter doesn't failed if <key> is not defined. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4034-diff-words.sh')
-rwxr-xr-xt/t4034-diff-words.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh
index 40ab333a8a..f2f55fc51c 100755
--- a/t/t4034-diff-words.sh
+++ b/t/t4034-diff-words.sh
@@ -230,7 +230,7 @@ test_expect_success '.gitattributes override config' '
'
test_expect_success 'setup: remove diff driver regex' '
- test_might_fail git config --unset diff.testdriver.wordRegex
+ test_unconfig diff.testdriver.wordRegex
'
test_expect_success 'use configured regex' '
@@ -335,8 +335,7 @@ test_expect_success 'word-diff with diff.sbe' '
c
EOF
- test_when_finished "git config --unset diff.suppress-blank-empty" &&
- git config diff.suppress-blank-empty true &&
+ test_config diff.suppress-blank-empty true &&
word_diff --word-diff=plain
'
@@ -368,7 +367,7 @@ test_expect_success 'setup history with two files' '
test_expect_success 'wordRegex for the first file does not apply to the second' '
echo "*.tex diff=tex" >.gitattributes &&
- git config diff.tex.wordRegex "[a-z]+|." &&
+ test_config diff.tex.wordRegex "[a-z]+|." &&
cat >expect <<-\EOF &&
diff --git a/a.tex b/a.tex
--- a/a.tex