summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lbu.in2
-rwxr-xr-xtests/lbu_test14
2 files changed, 15 insertions, 1 deletions
diff --git a/lbu.in b/lbu.in
index cff1e0e..8272244 100644
--- a/lbu.in
+++ b/lbu.in
@@ -558,7 +558,7 @@ usage_listbackup() {
usage: $PROGRAM list-backup [<media>]
__EOF__
- exit 1
+ exit $1
}
cmd_listbackup() {
diff --git a/tests/lbu_test b/tests/lbu_test
index 0733d79..d3ae3e3 100755
--- a/tests/lbu_test
+++ b/tests/lbu_test
@@ -15,6 +15,8 @@ init_tests \
lbu_diff_usage \
lbu_list_usage \
lbu_ls_usage \
+ lbu_list_backup_usage \
+ lbu_lb_usage \
lbu_package_usage
lbu_usage_body() {
@@ -102,6 +104,18 @@ lbu_ls_usage_body() {
lbu ls -h
}
+lbu_list_backup_usage_body() {
+ test_usage "lbu list-backup"
+}
+
+lbu_lb_usage_body() {
+ init_env
+ atf_check -s exit:0 \
+ -o match:"usage: lbu list-backup" \
+ -e empty \
+ lbu lb -h
+}
+
lbu_package_usage_body() {
init_env
atf_check -s exit:0 \