From a0578e0382f453924fd2df8ea0402b90cd01f826 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Wed, 17 Feb 2016 09:57:46 +0100 Subject: t: do not hide Git's exit code in tests using 'nul_to_q' Git should not be on the left-hand side of a pipe, because it hides the exit code, and we want to make sure git does not fail. Fix all invocations of 'nul_to_q' (defined in /t/test-lib-functions.sh) using this pattern. There is one more occurrence of the pattern in t9010-svn-fe.sh which is too evolved to change it easily. All remaining test code that does not adhere to the pattern can be found with the following command: git grep -E 'git.*[^|]\|($|[^|])' Helped-by: Jeff King Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano --- t/t1300-repo-config.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't/t1300-repo-config.sh') diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 52678e7d0a..1782addad4 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -957,13 +957,15 @@ Qsection.sub=section.val4 Qsection.sub=section.val5Q EOF test_expect_success '--null --list' ' - git config --null --list | nul_to_q >result && + git config --null --list >result.raw && + nul_to_q result && echo >>result && test_cmp expect result ' test_expect_success '--null --get-regexp' ' - git config --null --get-regexp "val[0-9]" | nul_to_q >result && + git config --null --get-regexp "val[0-9]" >result.raw && + nul_to_q result && echo >>result && test_cmp expect result ' -- cgit v1.2.3