summaryrefslogtreecommitdiff
path: root/t/t7407-submodule-foreach.sh
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2009-08-19 03:45:21 +0200
committerJunio C Hamano <gitster@pobox.com>2009-08-18 22:51:31 -0700
commit9aec7e0ba69334cf9bfc6bca6abbea7e84d676b2 (patch)
treee40a82fb2279b407c8bd99c963cc17c08c8832c4 /t/t7407-submodule-foreach.sh
parentd69ecf6f0ed2c1a31875a3f642deef0358ac9377 (diff)
downloadgit-9aec7e0ba69334cf9bfc6bca6abbea7e84d676b2.tar.gz
git submodule foreach: test access to submodule name as '$name'
Add verification of the behaviour of '$name' to the git submodule foreach selftest. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7407-submodule-foreach.sh')
-rwxr-xr-xt/t7407-submodule-foreach.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
index 76e0734cea..991aa80c8a 100755
--- a/t/t7407-submodule-foreach.sh
+++ b/t/t7407-submodule-foreach.sh
@@ -61,9 +61,9 @@ sub3sha1=$(cd super/sub3 && git rev-parse HEAD)
cat > expect <<EOF
Entering 'sub1'
-sub1-$sub1sha1
+foo1-sub1-$sub1sha1
Entering 'sub3'
-sub3-$sub3sha1
+foo3-sub3-$sub3sha1
EOF
test_expect_success 'test basic "submodule foreach" usage' '
@@ -71,7 +71,7 @@ test_expect_success 'test basic "submodule foreach" usage' '
(
cd clone &&
git submodule update --init -- sub1 sub3 &&
- git submodule foreach "echo \$path-\$sha1" > ../actual
+ git submodule foreach "echo \$name-\$path-\$sha1" > ../actual
) &&
test_cmp expect actual
'