summaryrefslogtreecommitdiff
path: root/t/t0014-alias.sh
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-11-27 11:53:08 -0800
committerJunio C Hamano <gitster@pobox.com>2019-11-29 13:20:14 -0800
commit17aa9d9c1af316d60ce6573daf0ff7b28bf009ed (patch)
tree33c8b71aac74c442681fd53c75c6c835104f91ef /t/t0014-alias.sh
parent77a946be98f4cf2947f9aefac924c0ee78a042c7 (diff)
downloadgit-17aa9d9c1af316d60ce6573daf0ff7b28bf009ed.tar.gz
t0014: remove git command upstream of pipe
Before, the `git frotz` command would fail but its return code was hidden since it was in the upstream of a pipe. Break the pipeline into two commands so that the return code is no longer lost. Also, mark `git frotz` with test_must_fail since it's supposed to fail. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0014-alias.sh')
-rwxr-xr-xt/t0014-alias.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0014-alias.sh b/t/t0014-alias.sh
index 2694c81afd..8d3d9144c0 100755
--- a/t/t0014-alias.sh
+++ b/t/t0014-alias.sh
@@ -38,8 +38,8 @@ test_expect_success 'looping aliases - internal execution' '
#'
test_expect_success 'run-command formats empty args properly' '
- GIT_TRACE=1 git frotz a "" b " " c 2>&1 |
- sed -ne "/run_command:/s/.*trace: run_command: //p" >actual &&
+ test_must_fail env GIT_TRACE=1 git frotz a "" b " " c 2>actual.raw &&
+ sed -ne "/run_command:/s/.*trace: run_command: //p" actual.raw >actual &&
echo "git-frotz a '\'''\'' b '\'' '\'' c" >expect &&
test_cmp expect actual
'