From 13c61544fe028ab69aed911f0255c69e0f70661d Mon Sep 17 00:00:00 2001 From: Geod24 Date: Thu, 20 Aug 2020 12:41:57 +0900 Subject: [PATCH] Improve output of tests/args.sh when failing --- tests/args.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/args.sh b/tests/args.sh index 67c66ff..bc112d7 100755 --- a/tests/args.sh +++ b/tests/args.sh @@ -3,8 +3,8 @@ set -e die() { echo "$@" 1>&2 ; exit 1; } -( dub args.d | grep -q '^argtest=$' ) || die "Fail (no argument)" -( dub args.d --argtest=aoeu | grep -q '^argtest=aoeu$' ) || die "Fail (with argument)" -( ( ! dub args.d --inexisting 2>&1 ) | grep -qF 'Unrecognized command line option' ) || die "Fail (unknown argument)" +( dub args.d | grep -q '^argtest=$' ) || die "Fail (no argument): '`dub args.d`'" +( dub args.d --argtest=aoeu | grep -q '^argtest=aoeu$' ) || die "Fail (with argument): '`dub args.d --argtest=aoeu`'" +( ( ! dub args.d --inexisting 2>&1 ) | grep -qF 'Unrecognized command line option' ) || die "Fail (unknown argument): '`dub args.d --inexisting 2>&1`'" echo 'OK'