summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-07-12 12:09:47 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-07-12 12:09:47 +0200
commitb7ec6550172925854e8ac7249555810aba82e6a8 (patch)
treece9729d6918744367e2189902081cbeb3236a076
parent97212b8686257e9638dd2f72ab2cfe44bb2c8a62 (diff)
downloadalpine-conf-b7ec6550172925854e8ac7249555810aba82e6a8.zip
lbu: fix package help text
-rw-r--r--lbu.in2
-rwxr-xr-xtests/lbu_test11
2 files changed, 11 insertions, 2 deletions
diff --git a/lbu.in b/lbu.in
index 1eb1f46..cff1e0e 100644
--- a/lbu.in
+++ b/lbu.in
@@ -277,7 +277,7 @@ usage_package() {
If <dirname> nor <filename> is not specified, a package named
<hostname>.apkovl.tar.gz will be created in current work directory.
__EOF__
- exit 1
+ exit $1
}
_gen_filelist() {
diff --git a/tests/lbu_test b/tests/lbu_test
index 6cd47b2..0733d79 100755
--- a/tests/lbu_test
+++ b/tests/lbu_test
@@ -14,7 +14,8 @@ init_tests \
lbu_delete_usage \
lbu_diff_usage \
lbu_list_usage \
- lbu_ls_usage
+ lbu_ls_usage \
+ lbu_package_usage
lbu_usage_body() {
test_usage lbu
@@ -101,3 +102,11 @@ lbu_ls_usage_body() {
lbu ls -h
}
+lbu_package_usage_body() {
+ init_env
+ atf_check -s exit:0 \
+ -o match:"usage: lbu package" \
+ -e empty \
+ lbu package -h
+}
+