Skip to content

Commit 85bf5d6

Browse files
dschogitster
authored andcommitted
t1300: avoid relying on a bug
The test case 'unset with cont. lines' relied on a bug that is about to be fixed: it tests *explicitly* that removing the last entry from a config section leaves an *empty* section behind. Let's fix this test case not to rely on that behavior, simply by preventing the section from becoming empty. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 46fc89c commit 85bf5d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/t1300-config.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ bar = foo
108108
[beta]
109109
baz = multiple \
110110
lines
111+
foo = bar
111112
EOF
112113

113114
test_expect_success 'unset with cont. lines' '
@@ -118,6 +119,7 @@ cat > expect <<\EOF
118119
[alpha]
119120
bar = foo
120121
[beta]
122+
foo = bar
121123
EOF
122124

123125
test_expect_success 'unset with cont. lines is correct' 'test_cmp expect .git/config'

0 commit comments

Comments
 (0)