Skip to content

Commit 577dfd0

Browse files
peffgitster
authored andcommitted
t9100,t3419: enclose all test code in single-quotes
A few tests here use double-quotes around the snippets of shell code to run the tests. None of these tests wants to do any interpolation at all, and it just leads to an extra layer of quoting around all double-quotes and dollar signs inside the snippet. Let's switch to single quotes, like most other test scripts. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e1c0c15 commit 577dfd0

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

t/t3419-rebase-patch-id.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,25 @@ do_tests () {
7373
run git format-patch --stdout --ignore-if-in-upstream master
7474
"
7575

76-
test_expect_success $pr 'detect upstream patch' "
76+
test_expect_success $pr 'detect upstream patch' '
7777
git checkout -q master &&
7878
scramble file &&
7979
git add file &&
80-
git commit -q -m 'change big file again' &&
80+
git commit -q -m "change big file again" &&
8181
git checkout -q other^{} &&
8282
git rebase master &&
83-
test_must_fail test -n \"\$(git rev-list master...HEAD~)\"
84-
"
83+
test_must_fail test -n "$(git rev-list master...HEAD~)"
84+
'
8585

86-
test_expect_success $pr 'do not drop patch' "
86+
test_expect_success $pr 'do not drop patch' '
8787
git branch -f squashed master &&
8888
git checkout -q -f squashed &&
8989
git reset -q --soft HEAD~2 &&
9090
git commit -q -m squashed &&
9191
git checkout -q other^{} &&
9292
test_must_fail git rebase squashed &&
9393
rm -rf .git/rebase-apply
94-
"
94+
'
9595
}
9696

9797
do_tests 500

t/t9100-git-svn-basic.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ EOF
217217

218218
test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp a expected"
219219

220-
test_expect_success 'exit if remote refs are ambigious' "
220+
test_expect_success 'exit if remote refs are ambigious' '
221221
git config --add svn-remote.svn.fetch \
222222
bar:refs/remotes/git-svn &&
223223
test_must_fail git svn migrate
224-
"
224+
'
225225

226226
test_expect_success 'exit if init-ing a would clobber a URL' '
227227
svnadmin create "${PWD}/svnrepo2" &&
@@ -259,26 +259,26 @@ test_expect_success 'dcommit $rev does not clobber current branch' '
259259
git branch -D my-bar
260260
'
261261

262-
test_expect_success 'able to dcommit to a subdirectory' "
262+
test_expect_success 'able to dcommit to a subdirectory' '
263263
git svn fetch -i bar &&
264264
git checkout -b my-bar refs/remotes/bar &&
265265
echo abc > d &&
266266
git update-index --add d &&
267-
git commit -m '/bar/d should be in the log' &&
267+
git commit -m "/bar/d should be in the log" &&
268268
git svn dcommit -i bar &&
269-
test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\" &&
269+
test -z "$(git diff refs/heads/my-bar refs/remotes/bar)" &&
270270
mkdir newdir &&
271271
echo new > newdir/dir &&
272272
git update-index --add newdir/dir &&
273-
git commit -m 'add a new directory' &&
273+
git commit -m "add a new directory" &&
274274
git svn dcommit -i bar &&
275-
test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\" &&
275+
test -z "$(git diff refs/heads/my-bar refs/remotes/bar)" &&
276276
echo foo >> newdir/dir &&
277277
git update-index newdir/dir &&
278-
git commit -m 'modify a file in new directory' &&
278+
git commit -m "modify a file in new directory" &&
279279
git svn dcommit -i bar &&
280-
test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\"
281-
"
280+
test -z "$(git diff refs/heads/my-bar refs/remotes/bar)"
281+
'
282282

283283
test_expect_success 'dcommit should not fail with a touched file' '
284284
test_commit "commit-new-file-foo2" foo2 &&
@@ -291,13 +291,13 @@ test_expect_success 'rebase should not fail with a touched file' '
291291
git svn rebase
292292
'
293293

294-
test_expect_success 'able to set-tree to a subdirectory' "
294+
test_expect_success 'able to set-tree to a subdirectory' '
295295
echo cba > d &&
296296
git update-index d &&
297-
git commit -m 'update /bar/d' &&
297+
git commit -m "update /bar/d" &&
298298
git svn set-tree -i bar HEAD &&
299-
test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\"
300-
"
299+
test -z "$(git diff refs/heads/my-bar refs/remotes/bar)"
300+
'
301301

302302
test_expect_success 'git-svn works in a bare repository' '
303303
mkdir bare-repo &&

0 commit comments

Comments
 (0)