t: use common $SQ variable
In many test scripts, there are bespoke definitions of the single quote that are some variation of this: SQ="'" Define a common $SQ variable in test-lib.sh and replace all usages of these bespoke variables with the common one. This change was done by running `git grep =\"\'\" t/` and `git grep =\\\\\'` and manually changing the resulting definitions and corresponding usages. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Sep 5, 2019 at 15:10 UTC
bd482d6e3348fe369b3b1db2dadbca278a0f0025
11 files changed
+51
-60
t/t1300-config.sh
+4
-5
@@ -1294,26 +1294,25 @@ test_expect_success 'git -c is not confused by empty environment' '
1294
GIT_CONFIG_PARAMETERS="" git -c x.one=1 config --list
1295
'
1296
1297
-sq="'"
1297
test_expect_success 'detect bogus GIT_CONFIG_PARAMETERS' '
1298
cat >expect <<-\EOF &&
1299
env.one one
1300
env.two two
1301
EOF
1303
- GIT_CONFIG_PARAMETERS="${sq}env.one=one${sq} ${sq}env.two=two${sq}" \
1302
+ GIT_CONFIG_PARAMETERS="${SQ}env.one=one${SQ} ${SQ}env.two=two${SQ}" \
1303
git config --get-regexp "env.*" >actual &&
1304
test_cmp expect actual &&
1305
1306
cat >expect <<-EOF &&
1308
- env.one one${sq}
1307
+ env.one one${SQ}
1308
env.two two
1309
EOF
1311
- GIT_CONFIG_PARAMETERS="${sq}env.one=one${sq}\\$sq$sq$sq ${sq}env.two=two${sq}" \
1310
+ GIT_CONFIG_PARAMETERS="${SQ}env.one=one${SQ}\\$SQ$SQ$SQ ${SQ}env.two=two${SQ}" \
1311
git config --get-regexp "env.*" >actual &&
1312
test_cmp expect actual &&
1313
1314
test_must_fail env \
1316
- GIT_CONFIG_PARAMETERS="${sq}env.one=one${sq}\\$sq ${sq}env.two=two${sq}" \
1315
+ GIT_CONFIG_PARAMETERS="${SQ}env.one=one${SQ}\\$SQ ${SQ}env.two=two${SQ}" \
1316
git config --get-regexp "env.*"
1317
'
1318
t/t1404-update-ref-errors.sh
+31
-33
@@ -32,8 +32,6 @@ test_update_rejected () {
32
test_cmp unchanged actual
33
}
34
35
-Q="'"
36
-
35
# Test adding and deleting D/F-conflicting references in a single
36
# transaction.
37
df_test() {
@@ -93,7 +91,7 @@ df_test() {
91
delname="$delref"
92
fi &&
93
cat >expected-err <<-EOF &&
96
- fatal: cannot lock ref $Q$addname$Q: $Q$delref$Q exists; cannot create $Q$addref$Q
94
+ fatal: cannot lock ref $SQ$addname$SQ: $SQ$delref$SQ exists; cannot create $SQ$addref$SQ
95
EOF
96
$pack &&
97
if $add_del
@@ -123,7 +121,7 @@ test_expect_success 'existing loose ref is a simple prefix of new' '
121
122
prefix=refs/1l &&
123
test_update_rejected "a c e" false "b c/x d" \
126
- "$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"
124
+ "$SQ$prefix/c$SQ exists; cannot create $SQ$prefix/c/x$SQ"
125
126
'
127
@@ -131,7 +129,7 @@ test_expect_success 'existing packed ref is a simple prefix of new' '
129
130
prefix=refs/1p &&
131
test_update_rejected "a c e" true "b c/x d" \
134
- "$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"
132
+ "$SQ$prefix/c$SQ exists; cannot create $SQ$prefix/c/x$SQ"
133
134
'
135
@@ -139,7 +137,7 @@ test_expect_success 'existing loose ref is a deeper prefix of new' '
137
138
prefix=refs/2l &&
139
test_update_rejected "a c e" false "b c/x/y d" \
142
- "$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"
140
+ "$SQ$prefix/c$SQ exists; cannot create $SQ$prefix/c/x/y$SQ"
141
142
'
143
@@ -147,7 +145,7 @@ test_expect_success 'existing packed ref is a deeper prefix of new' '
145
146
prefix=refs/2p &&
147
test_update_rejected "a c e" true "b c/x/y d" \
150
- "$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"
148
+ "$SQ$prefix/c$SQ exists; cannot create $SQ$prefix/c/x/y$SQ"
149
150
'
151
@@ -155,7 +153,7 @@ test_expect_success 'new ref is a simple prefix of existing loose' '
153
154
prefix=refs/3l &&
155
test_update_rejected "a c/x e" false "b c d" \
158
- "$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"
156
+ "$SQ$prefix/c/x$SQ exists; cannot create $SQ$prefix/c$SQ"
157
158
'
159
@@ -163,7 +161,7 @@ test_expect_success 'new ref is a simple prefix of existing packed' '
161
162
prefix=refs/3p &&
163
test_update_rejected "a c/x e" true "b c d" \
166
- "$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"
164
+ "$SQ$prefix/c/x$SQ exists; cannot create $SQ$prefix/c$SQ"
165
166
'
167
@@ -171,7 +169,7 @@ test_expect_success 'new ref is a deeper prefix of existing loose' '
169
170
prefix=refs/4l &&
171
test_update_rejected "a c/x/y e" false "b c d" \
174
- "$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"
172
+ "$SQ$prefix/c/x/y$SQ exists; cannot create $SQ$prefix/c$SQ"
173
174
'
175
@@ -179,7 +177,7 @@ test_expect_success 'new ref is a deeper prefix of existing packed' '
177
178
prefix=refs/4p &&
179
test_update_rejected "a c/x/y e" true "b c d" \
182
- "$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"
180
+ "$SQ$prefix/c/x/y$SQ exists; cannot create $SQ$prefix/c$SQ"
181
182
'
183
@@ -187,7 +185,7 @@ test_expect_success 'one new ref is a simple prefix of another' '
185
186
prefix=refs/5 &&
187
test_update_rejected "a e" false "b c c/x d" \
190
- "cannot process $Q$prefix/c$Q and $Q$prefix/c/x$Q at the same time"
188
+ "cannot process $SQ$prefix/c$SQ and $SQ$prefix/c/x$SQ at the same time"
189
190
'
191
@@ -334,7 +332,7 @@ test_expect_success 'D/F conflict prevents indirect delete long packed + indirec
332
test_expect_success 'missing old value blocks update' '
333
prefix=refs/missing-update &&
334
cat >expected <<-EOF &&
337
- fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q
335
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: unable to resolve reference $SQ$prefix/foo$SQ
336
EOF
337
printf "%s\n" "update $prefix/foo $E $D" |
338
test_must_fail git update-ref --stdin 2>output.err &&
@@ -345,7 +343,7 @@ test_expect_success 'incorrect old value blocks update' '
343
prefix=refs/incorrect-update &&
344
git update-ref $prefix/foo $C &&
345
cat >expected <<-EOF &&
348
- fatal: cannot lock ref $Q$prefix/foo$Q: is at $C but expected $D
346
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: is at $C but expected $D
347
EOF
348
printf "%s\n" "update $prefix/foo $E $D" |
349
test_must_fail git update-ref --stdin 2>output.err &&
@@ -356,7 +354,7 @@ test_expect_success 'existing old value blocks create' '
354
prefix=refs/existing-create &&
355
git update-ref $prefix/foo $C &&
356
cat >expected <<-EOF &&
359
- fatal: cannot lock ref $Q$prefix/foo$Q: reference already exists
357
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: reference already exists
358
EOF
359
printf "%s\n" "create $prefix/foo $E" |
360
test_must_fail git update-ref --stdin 2>output.err &&
@@ -367,7 +365,7 @@ test_expect_success 'incorrect old value blocks delete' '
365
prefix=refs/incorrect-delete &&
366
git update-ref $prefix/foo $C &&
367
cat >expected <<-EOF &&
370
- fatal: cannot lock ref $Q$prefix/foo$Q: is at $C but expected $D
368
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: is at $C but expected $D
369
EOF
370
printf "%s\n" "delete $prefix/foo $D" |
371
test_must_fail git update-ref --stdin 2>output.err &&
@@ -378,7 +376,7 @@ test_expect_success 'missing old value blocks indirect update' '
376
prefix=refs/missing-indirect-update &&
377
git symbolic-ref $prefix/symref $prefix/foo &&
378
cat >expected <<-EOF &&
381
- fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q
379
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: unable to resolve reference $SQ$prefix/foo$SQ
380
EOF
381
printf "%s\n" "update $prefix/symref $E $D" |
382
test_must_fail git update-ref --stdin 2>output.err &&
@@ -390,7 +388,7 @@ test_expect_success 'incorrect old value blocks indirect update' '
388
git symbolic-ref $prefix/symref $prefix/foo &&
389
git update-ref $prefix/foo $C &&
390
cat >expected <<-EOF &&
393
- fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
391
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: is at $C but expected $D
392
EOF
393
printf "%s\n" "update $prefix/symref $E $D" |
394
test_must_fail git update-ref --stdin 2>output.err &&
@@ -402,7 +400,7 @@ test_expect_success 'existing old value blocks indirect create' '
400
git symbolic-ref $prefix/symref $prefix/foo &&
401
git update-ref $prefix/foo $C &&
402
cat >expected <<-EOF &&
405
- fatal: cannot lock ref $Q$prefix/symref$Q: reference already exists
403
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: reference already exists
404
EOF
405
printf "%s\n" "create $prefix/symref $E" |
406
test_must_fail git update-ref --stdin 2>output.err &&
@@ -414,7 +412,7 @@ test_expect_success 'incorrect old value blocks indirect delete' '
412
git symbolic-ref $prefix/symref $prefix/foo &&
413
git update-ref $prefix/foo $C &&
414
cat >expected <<-EOF &&
417
- fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
415
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: is at $C but expected $D
416
EOF
417
printf "%s\n" "delete $prefix/symref $D" |
418
test_must_fail git update-ref --stdin 2>output.err &&
@@ -425,7 +423,7 @@ test_expect_success 'missing old value blocks indirect no-deref update' '
423
prefix=refs/missing-noderef-update &&
424
git symbolic-ref $prefix/symref $prefix/foo &&
425
cat >expected <<-EOF &&
428
- fatal: cannot lock ref $Q$prefix/symref$Q: reference is missing but expected $D
426
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: reference is missing but expected $D
427
EOF
428
printf "%s\n" "option no-deref" "update $prefix/symref $E $D" |
429
test_must_fail git update-ref --stdin 2>output.err &&
@@ -437,7 +435,7 @@ test_expect_success 'incorrect old value blocks indirect no-deref update' '
435
git symbolic-ref $prefix/symref $prefix/foo &&
436
git update-ref $prefix/foo $C &&
437
cat >expected <<-EOF &&
440
- fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
438
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: is at $C but expected $D
439
EOF
440
printf "%s\n" "option no-deref" "update $prefix/symref $E $D" |
441
test_must_fail git update-ref --stdin 2>output.err &&
@@ -449,7 +447,7 @@ test_expect_success 'existing old value blocks indirect no-deref create' '
447
git symbolic-ref $prefix/symref $prefix/foo &&
448
git update-ref $prefix/foo $C &&
449
cat >expected <<-EOF &&
452
- fatal: cannot lock ref $Q$prefix/symref$Q: reference already exists
450
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: reference already exists
451
EOF
452
printf "%s\n" "option no-deref" "create $prefix/symref $E" |
453
test_must_fail git update-ref --stdin 2>output.err &&
@@ -461,7 +459,7 @@ test_expect_success 'incorrect old value blocks indirect no-deref delete' '
459
git symbolic-ref $prefix/symref $prefix/foo &&
460
git update-ref $prefix/foo $C &&
461
cat >expected <<-EOF &&
464
- fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
462
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: is at $C but expected $D
463
EOF
464
printf "%s\n" "option no-deref" "delete $prefix/symref $D" |
465
test_must_fail git update-ref --stdin 2>output.err &&
@@ -474,13 +472,13 @@ test_expect_success 'non-empty directory blocks create' '
472
: >.git/$prefix/foo/bar/baz.lock &&
473
test_when_finished "rm -f .git/$prefix/foo/bar/baz.lock" &&
474
cat >expected <<-EOF &&
477
- fatal: cannot lock ref $Q$prefix/foo$Q: there is a non-empty directory $Q.git/$prefix/foo$Q blocking reference $Q$prefix/foo$Q
475
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: there is a non-empty directory $SQ.git/$prefix/foo$SQ blocking reference $SQ$prefix/foo$SQ
476
EOF
477
printf "%s\n" "update $prefix/foo $C" |
478
test_must_fail git update-ref --stdin 2>output.err &&
479
test_cmp expected output.err &&
480
cat >expected <<-EOF &&
483
- fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q
481
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: unable to resolve reference $SQ$prefix/foo$SQ
482
EOF
483
printf "%s\n" "update $prefix/foo $D $C" |
484
test_must_fail git update-ref --stdin 2>output.err &&
@@ -493,13 +491,13 @@ test_expect_success 'broken reference blocks create' '
491
echo "gobbledigook" >.git/$prefix/foo &&
492
test_when_finished "rm -f .git/$prefix/foo" &&
493
cat >expected <<-EOF &&
496
- fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
494
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: unable to resolve reference $SQ$prefix/foo$SQ: reference broken
495
EOF
496
printf "%s\n" "update $prefix/foo $C" |
497
test_must_fail git update-ref --stdin 2>output.err &&
498
test_cmp expected output.err &&
499
cat >expected <<-EOF &&
502
- fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
500
+ fatal: cannot lock ref $SQ$prefix/foo$SQ: unable to resolve reference $SQ$prefix/foo$SQ: reference broken
501
EOF
502
printf "%s\n" "update $prefix/foo $D $C" |
503
test_must_fail git update-ref --stdin 2>output.err &&
@@ -513,13 +511,13 @@ test_expect_success 'non-empty directory blocks indirect create' '
511
: >.git/$prefix/foo/bar/baz.lock &&
512
test_when_finished "rm -f .git/$prefix/foo/bar/baz.lock" &&
513
cat >expected <<-EOF &&
516
- fatal: cannot lock ref $Q$prefix/symref$Q: there is a non-empty directory $Q.git/$prefix/foo$Q blocking reference $Q$prefix/foo$Q
514
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: there is a non-empty directory $SQ.git/$prefix/foo$SQ blocking reference $SQ$prefix/foo$SQ
515
EOF
516
printf "%s\n" "update $prefix/symref $C" |
517
test_must_fail git update-ref --stdin 2>output.err &&
518
test_cmp expected output.err &&
519
cat >expected <<-EOF &&
522
- fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q
520
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: unable to resolve reference $SQ$prefix/foo$SQ
521
EOF
522
printf "%s\n" "update $prefix/symref $D $C" |
523
test_must_fail git update-ref --stdin 2>output.err &&
@@ -532,13 +530,13 @@ test_expect_success 'broken reference blocks indirect create' '
530
echo "gobbledigook" >.git/$prefix/foo &&
531
test_when_finished "rm -f .git/$prefix/foo" &&
532
cat >expected <<-EOF &&
535
- fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
533
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: unable to resolve reference $SQ$prefix/foo$SQ: reference broken
534
EOF
535
printf "%s\n" "update $prefix/symref $C" |
536
test_must_fail git update-ref --stdin 2>output.err &&
537
test_cmp expected output.err &&
538
cat >expected <<-EOF &&
541
- fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
539
+ fatal: cannot lock ref $SQ$prefix/symref$SQ: unable to resolve reference $SQ$prefix/foo$SQ: reference broken
540
EOF
541
printf "%s\n" "update $prefix/symref $D $C" |
542
test_must_fail git update-ref --stdin 2>output.err &&
@@ -614,7 +612,7 @@ test_expect_success 'delete fails cleanly if packed-refs file is locked' '
612
test_when_finished "rm -f .git/packed-refs.lock" &&
613
test_must_fail git update-ref -d $prefix/foo >out 2>err &&
614
git for-each-ref $prefix >actual &&
617
- test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: " err &&
615
+ test_i18ngrep "Unable to create $SQ.*packed-refs.lock$SQ: " err &&
616
test_cmp unchanged actual
617
'
618
t/t1414-reflog-walk.sh
+1
-2
@@ -18,10 +18,9 @@ do_walk () {
18
git log -g --format="%gd %gs" "$@"
19
}
20
21
-sq="'"
21
test_expect_success 'set up expected reflog' '
22
cat >expect.all <<-EOF
24
- HEAD@{0} commit (merge): Merge branch ${sq}master${sq} into side
23
+ HEAD@{0} commit (merge): Merge branch ${SQ}master${SQ} into side
24
HEAD@{1} commit: three
25
HEAD@{2} checkout: moving from master to side
26
HEAD@{3} commit: two
t/t1506-rev-parse-diagnosis.sh
+2
-3
@@ -8,10 +8,9 @@ exec </dev/null
8
9
test_did_you_mean ()
10
{
11
- sq="'" &&
11
cat >expected <<-EOF &&
13
- fatal: Path '$2$3' $4, but not ${5:-$sq$3$sq}.
14
- Did you mean '$1:$2$3'${2:+ aka $sq$1:./$3$sq}?
12
+ fatal: Path '$2$3' $4, but not ${5:-$SQ$3$SQ}.
13
+ Did you mean '$1:$2$3'${2:+ aka $SQ$1:./$3$SQ}?
14
EOF
15
test_cmp expected error
16
}
t/t1507-rev-parse-upstream.sh
+5
-7
@@ -28,8 +28,6 @@ test_expect_success 'setup' '
28
)
29
'
30
31
-sq="'"
32
-
31
full_name () {
32
(cd clone &&
33
git rev-parse --symbolic-full-name "$@")
@@ -129,7 +127,7 @@ test_expect_success 'merge my-side@{u} records the correct name' '
127
git branch -t new my-side@{u} &&
128
git merge -s ours new@{u} &&
129
git show -s --pretty=tformat:%s >actual &&
132
- echo "Merge remote-tracking branch ${sq}origin/side${sq}" >expect &&
130
+ echo "Merge remote-tracking branch ${SQ}origin/side${SQ}" >expect &&
131
test_cmp expect actual
132
)
133
'
@@ -156,7 +154,7 @@ test_expect_success 'branch@{u} works when tracking a local branch' '
154
155
test_expect_success 'branch@{u} error message when no upstream' '
156
cat >expect <<-EOF &&
159
- fatal: no upstream configured for branch ${sq}non-tracking${sq}
157
+ fatal: no upstream configured for branch ${SQ}non-tracking${SQ}
158
EOF
159
error_message non-tracking@{u} &&
160
test_i18ncmp expect error
@@ -164,7 +162,7 @@ test_expect_success 'branch@{u} error message when no upstream' '
162
163
test_expect_success '@{u} error message when no upstream' '
164
cat >expect <<-EOF &&
167
- fatal: no upstream configured for branch ${sq}master${sq}
165
+ fatal: no upstream configured for branch ${SQ}master${SQ}
166
EOF
167
test_must_fail git rev-parse --verify @{u} 2>actual &&
168
test_i18ncmp expect actual
@@ -172,7 +170,7 @@ test_expect_success '@{u} error message when no upstream' '
170
171
test_expect_success 'branch@{u} error message with misspelt branch' '
172
cat >expect <<-EOF &&
175
- fatal: no such branch: ${sq}no-such-branch${sq}
173
+ fatal: no such branch: ${SQ}no-such-branch${SQ}
174
EOF
175
error_message no-such-branch@{u} &&
176
test_i18ncmp expect error
@@ -189,7 +187,7 @@ test_expect_success '@{u} error message when not on a branch' '
187
188
test_expect_success 'branch@{u} error message if upstream branch not fetched' '
189
cat >expect <<-EOF &&
192
- fatal: upstream branch ${sq}refs/heads/side${sq} not stored as a remote-tracking branch
190
+ fatal: upstream branch ${SQ}refs/heads/side${SQ} not stored as a remote-tracking branch
191
EOF
192
error_message bad-upstream@{u} &&
193
test_i18ncmp expect error
t/t3005-ls-files-relative.sh
+4
-5
@@ -9,7 +9,6 @@ This test runs git ls-files with various relative path arguments.
9
10
new_line='
11
'
12
-sq=\'
12
13
test_expect_success 'prepare' '
14
: >never-mind-me &&
@@ -44,9 +43,9 @@ test_expect_success 'ls-files -c' '
43
cd top/sub &&
44
for f in ../y*
45
do
47
- echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
46
+ echo "error: pathspec $SQ$f$SQ did not match any file(s) known to git"
47
done >expect.err &&
49
- echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
48
+ echo "Did you forget to ${SQ}git add${SQ}?" >>expect.err &&
49
ls ../x* >expect.out &&
50
test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual.out 2>actual.err &&
51
test_cmp expect.out actual.out &&
@@ -59,9 +58,9 @@ test_expect_success 'ls-files -o' '
58
cd top/sub &&
59
for f in ../x*
60
do
62
- echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
61
+ echo "error: pathspec $SQ$f$SQ did not match any file(s) known to git"
62
done >expect.err &&
64
- echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
63
+ echo "Did you forget to ${SQ}git add${SQ}?" >>expect.err &&
64
ls ../y* >expect.out &&
65
test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual.out 2>actual.err &&
66
test_cmp expect.out actual.out &&
t/t3404-rebase-interactive.sh
-1
@@ -1419,7 +1419,6 @@ test_expect_success 'editor saves as CR/LF' '
1419
)
1420
'
1421
1422
-SQ="'"
1422
test_expect_success 'rebase -i --gpg-sign=<key-id>' '
1423
test_when_finished "test_might_fail git rebase --abort" &&
1424
set_fake_editor &&
t/t3430-rebase-merges.sh
-1
@@ -151,7 +151,6 @@ test_expect_success 'failed `merge -C` writes patch (may be rescheduled, too)' '
151
test_path_is_file .git/rebase-merge/patch
152
'
153
154
-SQ="'"
154
test_expect_success 'failed `merge <branch>` does not crash' '
155
test_when_finished "test_might_fail git rebase --abort" &&
156
git checkout conflicting-G &&
t/t5601-clone.sh
-1
@@ -434,7 +434,6 @@ test_expect_success 'double quoted plink.exe in GIT_SSH_COMMAND' '
434
expect_ssh "-v -P 123" myhost src
435
'
436
437
-SQ="'"
437
test_expect_success 'single quoted plink.exe in GIT_SSH_COMMAND' '
438
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink.exe" &&
439
GIT_SSH_COMMAND="$SQ$TRASH_DIRECTORY/plink.exe$SQ -v" \
t/t7406-submodule-update.sh
+1
-2
@@ -158,7 +158,6 @@ test_expect_success 'submodule update --init from and of subdirectory' '
158
test_i18ncmp expect2 actual2
159
'
160
161
-apos="'";
161
test_expect_success 'submodule update does not fetch already present commits' '
162
(cd submodule &&
163
echo line3 >> file &&
@@ -168,7 +167,7 @@ test_expect_success 'submodule update does not fetch already present commits' '
167
) &&
168
(cd super/submodule &&
169
head=$(git rev-parse --verify HEAD) &&
171
- echo "Submodule path ${apos}submodule$apos: checked out $apos$head$apos" > ../../expected &&
170
+ echo "Submodule path ${SQ}submodule$SQ: checked out $SQ$head$SQ" > ../../expected &&
171
git reset --hard HEAD~1
172
) &&
173
(cd super &&
t/test-lib.sh
+3
@@ -509,6 +509,9 @@ EMPTY_BLOB=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
509
LF='
510
'
511
512
+# Single quote
513
+SQ=\'
514
+
515
# UTF-8 ZERO WIDTH NON-JOINER, which HFS+ ignores
516
# when case-folding filenames
517
u200c=$(printf '\342\200\214')