Skip to content

Commit 7f89ad8

Browse files
pks-tgitster
authored andcommitted
t1300: small style fixups
We have a couple of small style violations in t1300: - An empty newline at the start of the test body. - The test command is sometimes on the same line as the test name. - The closing single-quote is sometimes on the same line as the last command of the test. Fix these. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f1371a3 commit 7f89ad8

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

t/t1300-config.sh

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ test_expect_success 'Prohibited LF in comment' '
213213
test_must_fail git config ${mode_set} --comment="a${LF}b" section.k v
214214
'
215215

216-
test_expect_success 'non-match result' 'test_cmp expect .git/config'
216+
test_expect_success 'non-match result' '
217+
test_cmp expect .git/config
218+
'
217219

218220
test_expect_success 'find mixed-case key by canonical name' '
219221
test_cmp_config Second sections.whatever
@@ -455,9 +457,13 @@ EOF
455457
test_cmp expect .git/config
456458
'
457459

458-
test_expect_success 'invalid key' 'test_must_fail git config inval.2key blabla'
460+
test_expect_success 'invalid key' '
461+
test_must_fail git config inval.2key blabla
462+
'
459463

460-
test_expect_success 'correct key' 'git config 123456.a123 987'
464+
test_expect_success 'correct key' '
465+
git config 123456.a123 987
466+
'
461467

462468
test_expect_success 'hierarchical section' '
463469
git config Version.1.2.3eX.Alpha beta
@@ -490,6 +496,7 @@ test_expect_success 'working --list' '
490496
git config ${mode_prefix}list > output &&
491497
test_cmp expect output
492498
'
499+
493500
test_expect_success '--list without repo produces empty output' '
494501
git --git-dir=nonexistent config ${mode_prefix}list >output &&
495502
test_must_be_empty output
@@ -887,16 +894,17 @@ test_expect_success bool '
887894
git config --bool --get bool.true$i >>result &&
888895
git config --bool --get bool.false$i >>result || return 1
889896
done &&
890-
test_cmp expect result'
897+
test_cmp expect result
898+
'
891899

892900
test_expect_success 'invalid bool (--get)' '
893-
894901
git config ${mode_set} bool.nobool foobar &&
895-
test_must_fail git config --bool --get bool.nobool'
902+
test_must_fail git config --bool --get bool.nobool
903+
'
896904

897905
test_expect_success 'invalid bool (set)' '
898-
899-
test_must_fail git config --bool bool.nobool foobar'
906+
test_must_fail git config --bool bool.nobool foobar
907+
'
900908

901909
test_expect_success 'set --bool' '
902910
cat >expect <<\EOF &&
@@ -999,7 +1007,8 @@ EOF
9991007
git config --path path.home "~/" &&
10001008
git config --path path.normal "/dev/null" &&
10011009
git config --path path.trailingtilde "foo~" &&
1002-
test_cmp expect .git/config'
1010+
test_cmp expect .git/config
1011+
'
10031012

10041013
if test_have_prereq !MINGW && test "${HOME+set}"
10051014
then
@@ -1117,10 +1126,13 @@ EOF
11171126

11181127
test_expect_success 'key with newline' '
11191128
test_must_fail git config ${mode_get} "key.with
1120-
newline" 123'
1129+
newline" 123
1130+
'
11211131

1122-
test_expect_success 'value with newline' 'git config ${mode_set} key.sub value.with\\\
1123-
newline'
1132+
test_expect_success 'value with newline' '
1133+
git config ${mode_set} key.sub value.with\\\
1134+
newline
1135+
'
11241136

11251137
cat > .git/config <<\EOF
11261138
[section]
@@ -1330,7 +1342,6 @@ test_expect_success 'multiple git -c appends config' '
13301342
'
13311343

13321344
test_expect_success 'last one wins: two level vars' '
1333-
13341345
# sec.var and sec.VAR are the same variable, as the first
13351346
# and the last level of a configuration variable name is
13361347
# case insensitive.
@@ -1349,7 +1360,6 @@ test_expect_success 'last one wins: two level vars' '
13491360
'
13501361

13511362
test_expect_success 'last one wins: three level vars' '
1352-
13531363
# v.a.r and v.A.r are not the same variable, as the middle
13541364
# level of a three-level configuration variable name is
13551365
# case sensitive.

0 commit comments

Comments
 (0)