diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-04-01 03:31:17 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-01 03:31:17 +0400 |
commit | ad4d8911f8d680ea3948760ba025351ff031736d (patch) | |
tree | e16a677e0de94afb000d2d56f2a80c0d219b47c7 /t/t1300-repo-config.sh | |
parent | 00d4ff1a69883e24b095f45251d99143b5bc0320 (diff) | |
parent | 410c3428ed42bc0978e2917236e95cd5f860864f (diff) |
Merge branch 'jk/tests-cleanup'
* jk/tests-cleanup:
t0001: drop subshells just for "cd"
t0001: drop useless subshells
t0001: use test_must_fail
t0001: use test_config_global
t0001: use test_path_is_*
t0001: make symlink reinit test more careful
t: prefer "git config --file" to GIT_CONFIG
t: prefer "git config --file" to GIT_CONFIG with test_must_fail
t: stop using GIT_CONFIG to cross repo boundaries
t: drop useless sane_unset GIT_* calls
t/test-lib: drop redundant unset of GIT_CONFIG
t/Makefile: stop setting GIT_CONFIG
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-x | t/t1300-repo-config.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 3e3f77b59b..58cd5435be 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -461,7 +461,7 @@ test_expect_success 'new variable inserts into proper section' ' test_cmp expect .git/config ' -test_expect_success 'alternative GIT_CONFIG (non-existing file should fail)' ' +test_expect_success 'alternative --file (non-existing file should fail)' ' test_must_fail git config --file non-existing-config -l ' @@ -508,10 +508,10 @@ test_expect_success 'refer config from subdirectory' ' ' -test_expect_success 'refer config from subdirectory via GIT_CONFIG' ' +test_expect_success 'refer config from subdirectory via --file' ' ( cd x && - GIT_CONFIG=../other-config git config --get ein.bahn >actual && + git config --file=../other-config --get ein.bahn >actual && test_cmp expect actual ) ' @@ -523,8 +523,8 @@ cat > expect << EOF park = ausweis EOF -test_expect_success '--set in alternative GIT_CONFIG' ' - GIT_CONFIG=other-config git config anwohner.park ausweis && +test_expect_success '--set in alternative file' ' + git config --file=other-config anwohner.park ausweis && test_cmp expect other-config ' @@ -955,11 +955,11 @@ test_expect_success 'inner whitespace kept verbatim' ' test_expect_success SYMLINKS 'symlinked configuration' ' ln -s notyet myconfig && - GIT_CONFIG=myconfig git config test.frotz nitfol && + git config --file=myconfig test.frotz nitfol && test -h myconfig && test -f notyet && - test "z$(GIT_CONFIG=notyet git config test.frotz)" = znitfol && - GIT_CONFIG=myconfig git config test.xyzzy rezrov && + test "z$(git config --file=notyet test.frotz)" = znitfol && + git config --file=myconfig test.xyzzy rezrov && test -h myconfig && test -f notyet && cat >expect <<-\EOF && @@ -967,22 +967,22 @@ test_expect_success SYMLINKS 'symlinked configuration' ' rezrov EOF { - GIT_CONFIG=notyet git config test.frotz && - GIT_CONFIG=notyet git config test.xyzzy + git config --file=notyet test.frotz && + git config --file=notyet test.xyzzy } >actual && test_cmp expect actual ' test_expect_success 'nonexistent configuration' ' - test_must_fail env GIT_CONFIG=doesnotexist git config --list && - test_must_fail env GIT_CONFIG=doesnotexist git config test.xyzzy + test_must_fail git config --file=doesnotexist --list && + test_must_fail git config --file=doesnotexist test.xyzzy ' test_expect_success SYMLINKS 'symlink to nonexistent configuration' ' ln -s doesnotexist linktonada && ln -s linktonada linktolinktonada && - test_must_fail env GIT_CONFIG=linktonada git config --list && - test_must_fail env GIT_CONFIG=linktolinktonada git config --list + test_must_fail git config --file=linktonada --list && + test_must_fail git config --file=linktolinktonada --list ' test_expect_success 'check split_cmdline return' " |