summaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh28
1 files changed, 9 insertions, 19 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 48fd14f..894ea2f 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -101,7 +101,6 @@ inspect() {
test_expect_success 'submodule add' '
echo "refs/heads/master" >expect &&
- >empty &&
(
cd addtest &&
@@ -123,7 +122,7 @@ test_expect_success 'submodule add' '
inspect addtest/submod ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success 'setup parent and one repository' '
@@ -188,7 +187,6 @@ test_expect_success 'submodule add --branch' '
refs/heads/initial
refs/heads/master
EOF
- >empty &&
(
cd addtest &&
@@ -201,12 +199,11 @@ test_expect_success 'submodule add --branch' '
inspect addtest/submod-branch ../.. &&
test_cmp expect-heads heads &&
test_cmp expect-head head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success 'submodule add with ./ in path' '
echo "refs/heads/master" >expect &&
- >empty &&
(
cd addtest &&
@@ -218,12 +215,11 @@ test_expect_success 'submodule add with ./ in path' '
inspect addtest/dotsubmod/frotz ../../.. &&
test_cmp expect heads &&
test_cmp expect head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success 'submodule add with /././ in path' '
echo "refs/heads/master" >expect &&
- >empty &&
(
cd addtest &&
@@ -235,12 +231,11 @@ test_expect_success 'submodule add with /././ in path' '
inspect addtest/dotslashdotsubmod/frotz ../../.. &&
test_cmp expect heads &&
test_cmp expect head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success 'submodule add with // in path' '
echo "refs/heads/master" >expect &&
- >empty &&
(
cd addtest &&
@@ -252,12 +247,11 @@ test_expect_success 'submodule add with // in path' '
inspect addtest/slashslashsubmod/frotz ../../.. &&
test_cmp expect heads &&
test_cmp expect head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success 'submodule add with /.. in path' '
echo "refs/heads/master" >expect &&
- >empty &&
(
cd addtest &&
@@ -269,12 +263,11 @@ test_expect_success 'submodule add with /.. in path' '
inspect addtest/realsubmod ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success 'submodule add with ./, /.. and // in path' '
echo "refs/heads/master" >expect &&
- >empty &&
(
cd addtest &&
@@ -286,7 +279,7 @@ test_expect_success 'submodule add with ./, /.. and // in path' '
inspect addtest/realsubmod2 ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success !CYGWIN 'submodule add with \\ in path' '
@@ -305,7 +298,6 @@ test_expect_success !CYGWIN 'submodule add with \\ in path' '
test_expect_success 'submodule add in subdirectory' '
echo "refs/heads/master" >expect &&
- >empty &&
mkdir addtest/sub &&
(
@@ -318,7 +310,7 @@ test_expect_success 'submodule add in subdirectory' '
inspect addtest/realsubmod3 ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
- test_cmp empty untracked
+ test_must_be_empty untracked
'
test_expect_success 'submodule add in subdirectory with relative path should fail' '
@@ -501,8 +493,6 @@ test_expect_success 'checkout superproject with subproject already present' '
'
test_expect_success 'apply submodule diff' '
- >empty &&
-
git branch second &&
(
cd init &&
@@ -517,7 +507,7 @@ test_expect_success 'apply submodule diff' '
git apply --index P.diff &&
git diff --cached master >staged &&
- test_cmp empty staged
+ test_must_be_empty staged
'
test_expect_success 'update --init' '