summaryrefslogtreecommitdiff
path: root/t/t7406-submodule-update.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-22 22:12:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-22 22:39:51 (GMT)
commita4dded0189191db1aa572bdc45419182db8ae652 (patch)
tree333f49ac12fe3d3aab6ee659998a9f2026c5e87f /t/t7406-submodule-update.sh
parente7b37caf4feace4ee799570285b4699b23e0581f (diff)
downloadgit-a4dded0189191db1aa572bdc45419182db8ae652.zip
git-a4dded0189191db1aa572bdc45419182db8ae652.tar.gz
git-a4dded0189191db1aa572bdc45419182db8ae652.tar.bz2
t7406: correct test case for submodule-update initial population
There are three issues with the test: * The syntax of the here-doc was wrong, such that the entire test was sucked into the here-doc, which is why the test succeeded. * The variable $submodulesha1 was not expanded as it was inside a quoted here text. We do not want to quote EOF marker for this. * The redirection from the git command to the output file for comparison was wrong as the -C operator from git doesn't apply to the redirect path. Also we're interested in stderr of that command. Noticed-by: Jan Palus <jan.palus@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7406-submodule-update.sh')
-rwxr-xr-xt/t7406-submodule-update.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 8c086a4..a70fe96 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -425,11 +425,11 @@ test_expect_success 'submodule update - command in .git/config catches failure -
'
test_expect_success 'submodule update - command run for initial population of submodule' '
- cat <<-\ EOF >expect
+ cat >expect <<-EOF &&
Execution of '\''false $submodulesha1'\'' failed in submodule path '\''submodule'\''
- EOF &&
+ EOF
rm -rf super/submodule &&
- test_must_fail git -C super submodule update >../actual &&
+ test_must_fail git -C super submodule update 2>actual &&
test_cmp expect actual &&
git -C super submodule update --checkout
'