summaryrefslogtreecommitdiff
path: root/t/t4253-am-keep-cr-dos.sh
diff options
context:
space:
mode:
authorBoxuan Li <liboxuan@connect.hku.hk>2019-05-05 16:16:33 +0800
committerJunio C Hamano <gitster@pobox.com>2019-05-07 18:04:48 +0900
commitce4c7bfc90d93bdbf979d756c03c52d2d6b286d4 (patch)
tree4ad20a2a64e0b97195dd30f2f14421cca55e627d /t/t4253-am-keep-cr-dos.sh
parentaeb582a98374c094361cba1bd756dc6307432c42 (diff)
downloadgit-ce4c7bfc90d93bdbf979d756c03c52d2d6b286d4.tar.gz
t4253-am-keep-cr-dos: avoid using pipes
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Boxuan Li <liboxuan@connect.hku.hk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4253-am-keep-cr-dos.sh')
-rwxr-xr-xt/t4253-am-keep-cr-dos.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh
index 553fe3e88e..6e1b73ec3a 100755
--- a/t/t4253-am-keep-cr-dos.sh
+++ b/t/t4253-am-keep-cr-dos.sh
@@ -51,14 +51,16 @@ test_expect_success 'am with dos files without --keep-cr' '
test_expect_success 'am with dos files with --keep-cr' '
git checkout -b dosfiles-keep-cr initial &&
- git format-patch -k --stdout initial..master | git am --keep-cr -k -3 &&
+ git format-patch -k --stdout initial..master >output &&
+ git am --keep-cr -k -3 output &&
git diff --exit-code master
'
test_expect_success 'am with dos files config am.keepcr' '
git config am.keepcr 1 &&
git checkout -b dosfiles-conf-keepcr initial &&
- git format-patch -k --stdout initial..master | git am -k -3 &&
+ git format-patch -k --stdout initial..master >output &&
+ git am -k -3 output &&
git diff --exit-code master
'