Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Verma <shubhunic@gmail.com>2021-02-11 22:47:04 +0300
committerJunio C Hamano <gitster@pobox.com>2021-02-12 00:42:17 +0300
commit488acf15dfa3edec67fa0397d6d09b247c0c46ae (patch)
tree860c7a67416f8148310911ac1f27da1c5b1675aa /t/t7001-mv.sh
parent39252c833e0402c011dfb940a87db9d0a64ddd0c (diff)
t7001: use `test` rather than `[`
According to Documentation/CodingGuidelines, we should use "test" rather than "[ ... ]" in shell scripts, so let's replace the "[ ... ]" with "test" in the t7001 test script. Signed-off-by: Shubham Verma <shubhunic@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index c8c22c09e5..63d779d886 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -242,10 +242,10 @@ test_expect_success 'git mv should not change sha1 of moved cache entry' '
git add dirty &&
entry="$(git ls-files --stage dirty | cut -f 1)" &&
git mv dirty dirty2 &&
- [ "$entry" = "$(git ls-files --stage dirty2 | cut -f 1)" ] &&
+ test "$entry" = "$(git ls-files --stage dirty2 | cut -f 1)" &&
echo 2 >dirty2 &&
git mv dirty2 dirty &&
- [ "$entry" = "$(git ls-files --stage dirty | cut -f 1)" ]
+ test "$entry" = "$(git ls-files --stage dirty | cut -f 1)"
'
rm -f dirty dirty2
@@ -332,7 +332,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and no .gitm
mkdir mod &&
git mv sub mod/sub &&
! test -e sub &&
- [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ test "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" &&
git -C mod/sub status &&
git update-index --refresh &&
git diff-files --quiet
@@ -352,7 +352,7 @@ test_expect_success 'git mv moves a submodule with a .git directory and .gitmodu
mkdir mod &&
git mv sub mod/sub &&
! test -e sub &&
- [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ test "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" &&
git -C mod/sub status &&
echo mod/sub >expected &&
git config -f .gitmodules submodule.sub.path >actual &&
@@ -369,7 +369,7 @@ test_expect_success 'git mv moves a submodule with gitfile' '
mkdir mod &&
git -C mod mv ../sub/ . &&
! test -e sub &&
- [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ test "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" &&
git -C mod/sub status &&
echo mod/sub >expected &&
git config -f .gitmodules submodule.sub.path >actual &&
@@ -388,7 +388,7 @@ test_expect_success 'mv does not complain when no .gitmodules file is found' '
git mv sub mod/sub 2>actual.err &&
test_must_be_empty actual.err &&
! test -e sub &&
- [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ test "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" &&
git -C mod/sub status &&
git update-index --refresh &&
git diff-files --quiet
@@ -409,7 +409,7 @@ test_expect_success 'mv will error out on a modified .gitmodules file unless sta
git mv sub mod/sub 2>actual.err &&
test_must_be_empty actual.err &&
! test -e sub &&
- [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ test "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" &&
git -C mod/sub status &&
git update-index --refresh &&
git diff-files --quiet
@@ -427,7 +427,7 @@ test_expect_success 'mv issues a warning when section is not found in .gitmodule
git mv sub mod/sub 2>actual.err &&
test_i18ncmp expect.err actual.err &&
! test -e sub &&
- [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
+ test "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" &&
git -C mod/sub status &&
git update-index --refresh &&
git diff-files --quiet