From 1bb3abafe2523c72b52e5d9e9cee5c51762a1fc3 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 20 Mar 2018 21:56:28 +0100 Subject: [PATCH 1/2] sharness/t0010: don't pipe /dev/null into $cmd --help tests License: MIT Signed-off-by: Christian Couder --- test/sharness/t0010-basic-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sharness/t0010-basic-commands.sh b/test/sharness/t0010-basic-commands.sh index e9db0c6c1..822893e78 100755 --- a/test/sharness/t0010-basic-commands.sh +++ b/test/sharness/t0010-basic-commands.sh @@ -65,7 +65,7 @@ test_expect_success "All commands accept --help" ' echo 0 > fail while read -r cmd do - $cmd --help /dev/null || + $cmd --help >/dev/null || { echo "$cmd doesnt accept --help"; echo 1 > fail; } done Date: Tue, 20 Mar 2018 22:00:24 +0100 Subject: [PATCH 2/2] sharness/t0010: also check 'echo stuff | $cmd --help' License: MIT Signed-off-by: Christian Couder --- test/sharness/t0010-basic-commands.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/sharness/t0010-basic-commands.sh b/test/sharness/t0010-basic-commands.sh index 822893e78..8fff34c45 100755 --- a/test/sharness/t0010-basic-commands.sh +++ b/test/sharness/t0010-basic-commands.sh @@ -67,6 +67,8 @@ test_expect_success "All commands accept --help" ' do $cmd --help >/dev/null || { echo "$cmd doesnt accept --help"; echo 1 > fail; } + echo stuff | $cmd --help >/dev/null || + { echo "$cmd doesnt accept --help when using stdin"; echo 1 > fail; } done