Skip to content

Commit 34479d7

Browse files
Martin Ågrengitster
authored andcommitted
t1300: remove duplicate test for --file no-such-file
We test that we can handle `git config --file symlink` and the error case of `git config --file symlink-to-missing-file`. For good measure, we also throw in a test to check that we correctly handle referencing a missing regular file. But we have such a test earlier in this script. They both check that we fail to use `--file no-such-file --list`. Drop the latter of these and keep the one that is in the general area where we test `--file` and `GIT_CONFIG`. The one we're dropping also checks that we can't even get a specific key from the missing file -- let's make sure we check that in the test we keep. Signed-off-by: Martin Ågren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b832abb commit 34479d7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

t/t1300-config.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ test_expect_success 'new variable inserts into proper section' '
469469
'
470470

471471
test_expect_success 'alternative --file (non-existing file should fail)' '
472-
test_must_fail git config --file non-existing-config -l
472+
test_must_fail git config --file non-existing-config -l &&
473+
test_must_fail git config --file non-existing-config test.xyzzy
473474
'
474475

475476
cat > other-config << EOF
@@ -1032,11 +1033,6 @@ test_expect_success SYMLINKS 'symlinked configuration' '
10321033
test_cmp expect actual
10331034
'
10341035

1035-
test_expect_success 'nonexistent configuration' '
1036-
test_must_fail git config --file=doesnotexist --list &&
1037-
test_must_fail git config --file=doesnotexist test.xyzzy
1038-
'
1039-
10401036
test_expect_success SYMLINKS 'symlink to nonexistent configuration' '
10411037
ln -s doesnotexist linktonada &&
10421038
ln -s linktonada linktolinktonada &&

0 commit comments

Comments
 (0)