summaryrefslogtreecommitdiffstats
path: root/t/t3005-ls-files-relative.sh
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-09-06 00:10:05 +0200
committerJunio C Hamano <gitster@pobox.com>2019-09-06 20:10:36 +0200
commitbd482d6e3348fe369b3b1db2dadbca278a0f0025 (patch)
treebaba73254541c919d66fbedc1481191fcbaffbcf /t/t3005-ls-files-relative.sh
parentFirst batch after Git 2.23 (diff)
downloadgit-bd482d6e3348fe369b3b1db2dadbca278a0f0025.tar.xz
git-bd482d6e3348fe369b3b1db2dadbca278a0f0025.zip
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>
Diffstat (limited to 't/t3005-ls-files-relative.sh')
-rwxr-xr-xt/t3005-ls-files-relative.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/t3005-ls-files-relative.sh b/t/t3005-ls-files-relative.sh
index 209b4c7cd8..c841f9b454 100755
--- a/t/t3005-ls-files-relative.sh
+++ b/t/t3005-ls-files-relative.sh
@@ -9,7 +9,6 @@ This test runs git ls-files with various relative path arguments.
new_line='
'
-sq=\'
test_expect_success 'prepare' '
: >never-mind-me &&
@@ -44,9 +43,9 @@ test_expect_success 'ls-files -c' '
cd top/sub &&
for f in ../y*
do
- echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
+ echo "error: pathspec $SQ$f$SQ did not match any file(s) known to git"
done >expect.err &&
- echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
+ echo "Did you forget to ${SQ}git add${SQ}?" >>expect.err &&
ls ../x* >expect.out &&
test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&
@@ -59,9 +58,9 @@ test_expect_success 'ls-files -o' '
cd top/sub &&
for f in ../x*
do
- echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
+ echo "error: pathspec $SQ$f$SQ did not match any file(s) known to git"
done >expect.err &&
- echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
+ echo "Did you forget to ${SQ}git add${SQ}?" >>expect.err &&
ls ../y* >expect.out &&
test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&