summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-27 11:48:42 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-06-28 18:23:25 +0200
commitbb867c57186f06ba172e7984b2318571ea08807b (patch)
tree4e614c38be5feaabe2370ca186ed4439d49c83d4 /tests
parentcbf2f9e3ba66acb8c32f0826a90ea6fd39a349dc (diff)
downloadalpine-conf-bb867c57186f06ba172e7984b2318571ea08807b.zip
tests: fix test_usage to accept sub commands
so we can test things like `lbu commit`
Diffstat (limited to 'tests')
-rw-r--r--tests/test_env.sh9
1 files changed, 4 insertions, 5 deletions
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
}