diff options
author | Shubham Mishra <shivam828787@gmail.com> | 2022-03-12 09:21:25 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-13 03:22:01 +0300 |
commit | 9b6d1fc48a29abdd49c267ce1bf06bac5151a0e4 (patch) | |
tree | 3d9b60799bcb86c478241e7330414c0db2012800 /t/t0025-crlf-renormalize.sh | |
parent | ae5d569bb22ea4e889c9a2da757ed0c253ec1fc1 (diff) |
t0001-t0028: avoid pipes with Git on LHS
Pipes ignore error codes of LHS command and thus we should not use
them with Git in tests. As an alternative, use a 'tmp' file to write
the Git output so we can test the exit code.
Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0025-crlf-renormalize.sh')
-rwxr-xr-x | t/t0025-crlf-renormalize.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0025-crlf-renormalize.sh b/t/t0025-crlf-renormalize.sh index 81447978b7..f7202c192e 100755 --- a/t/t0025-crlf-renormalize.sh +++ b/t/t0025-crlf-renormalize.sh @@ -22,8 +22,8 @@ test_expect_success 'renormalize CRLF in repo' ' i/lf w/lf attr/text=auto LF.txt i/lf w/mixed attr/text=auto CRLF_mix_LF.txt EOF - git ls-files --eol | - sed -e "s/ / /g" -e "s/ */ /g" | + git ls-files --eol >tmp && + sed -e "s/ / /g" -e "s/ */ /g" tmp | sort >actual && test_cmp expect actual ' |