From ee6bc4f2ce6da48f25a29931a178159e5801b5d9 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 24 Jan 2021 03:11:52 -0300 Subject: Add tests/ranking.sh --- tests/cli-opts.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tests/cli-opts.sh') diff --git a/tests/cli-opts.sh b/tests/cli-opts.sh index 0b6090a..cca2228 100755 --- a/tests/cli-opts.sh +++ b/tests/cli-opts.sh @@ -5,8 +5,8 @@ set -u assert_usage() { if ! grep -Fq 'Usage' "$1"; then - echo 'Expected to find "Usage" text, it was missing:' - cat "$ERR" + echo 'Expected to find "Usage" text, it was missing:' >&2 + cat "$ERR" >&2 exit 1 fi } @@ -79,11 +79,7 @@ test_valid_options() { STATUS=$? assert_status 0 assert_empty_stderr - if [ "$(cat "$OUT")" != 'a' ]; then - echo "Expected STDOUT ($OUT) to be 'a', but was:" - cat "$OUT" - exit 1 - fi + assert_stdout 'a' } test_help_flags() { -- cgit v1.2.3