From bb867c57186f06ba172e7984b2318571ea08807b Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 27 May 2022 11:48:42 +0200 Subject: tests: fix test_usage to accept sub commands so we can test things like `lbu commit` --- tests/test_env.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_env.sh b/tests/test_env.sh index a20f5ae..57fd09f 100644 --- a/tests/test_env.sh +++ b/tests/test_env.sh @@ -19,16 +19,15 @@ atf_init_test_cases() { } test_usage() { - local prog="$1" init_env atf_check -s exit:0 \ - -o match:"^usage: $prog" \ + -o match:"^usage: $@" \ -e empty \ - $prog -h + $@ -h atf_check -s exit:1 \ -o empty \ - -e match:"^usage: $prog" \ - $prog -INVALID + -e match:"^usage: $@" \ + $@ -INVALID } -- cgit v1.2.3