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 <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Sep 22, 2025 at 15:06 UTC
7f89ad8c8c805b3b062d73d89c0763462a930e92
1 file changed
+24
-14
t/t1300-config.sh
+24
-14
@@ -213,7 +213,9 @@ test_expect_success 'Prohibited LF in comment' '
213
test_must_fail git config ${mode_set} --comment="a${LF}b" section.k v
214
'
215
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
+'
219
220
test_expect_success 'find mixed-case key by canonical name' '
221
test_cmp_config Second sections.whatever
@@ -455,9 +457,13 @@ EOF
457
test_cmp expect .git/config
458
'
459
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
+'
463
460
-test_expect_success 'correct key' 'git config 123456.a123 987'
464
+test_expect_success 'correct key' '
465
+ git config 123456.a123 987
466
+'
467
468
test_expect_success 'hierarchical section' '
469
git config Version.1.2.3eX.Alpha beta
@@ -490,6 +496,7 @@ test_expect_success 'working --list' '
496
git config ${mode_prefix}list > output &&
497
test_cmp expect output
498
'
499
+
500
test_expect_success '--list without repo produces empty output' '
501
git --git-dir=nonexistent config ${mode_prefix}list >output &&
502
test_must_be_empty output
@@ -887,16 +894,17 @@ test_expect_success bool '
894
git config --bool --get bool.true$i >>result &&
895
git config --bool --get bool.false$i >>result || return 1
896
done &&
890
- test_cmp expect result'
897
+ test_cmp expect result
898
+'
899
900
test_expect_success 'invalid bool (--get)' '
893
-
901
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
+'
904
905
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
+'
908
909
test_expect_success 'set --bool' '
910
cat >expect <<\EOF &&
@@ -999,7 +1007,8 @@ EOF
1007
git config --path path.home "~/" &&
1008
git config --path path.normal "/dev/null" &&
1009
git config --path path.trailingtilde "foo~" &&
1002
- test_cmp expect .git/config'
1010
+ test_cmp expect .git/config
1011
+'
1012
1013
if test_have_prereq !MINGW && test "${HOME+set}"
1014
then
@@ -1117,10 +1126,13 @@ EOF
1126
1127
test_expect_success 'key with newline' '
1128
test_must_fail git config ${mode_get} "key.with
1120
-newline" 123'
1129
+newline" 123
1130
+'
1131
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
+'
1136
1137
cat > .git/config <<\EOF
1138
[section]
@@ -1330,7 +1342,6 @@ test_expect_success 'multiple git -c appends config' '
1342
'
1343
1344
test_expect_success 'last one wins: two level vars' '
1333
-
1345
# sec.var and sec.VAR are the same variable, as the first
1346
# and the last level of a configuration variable name is
1347
# case insensitive.
@@ -1349,7 +1360,6 @@ test_expect_success 'last one wins: two level vars' '
1360
'
1361
1362
test_expect_success 'last one wins: three level vars' '
1352
-
1363
# v.a.r and v.A.r are not the same variable, as the middle
1364
# level of a three-level configuration variable name is
1365
# case sensitive.