Commit d38b0864 authored by Natanael Copa's avatar Natanael Copa
Browse files

lbu: add tests for lbu exclude usage

parent 797dde88
......@@ -522,18 +522,18 @@ usage_exclude() {
-r Remove specified file(s) from exclude list instead of adding.
-v Verbose mode.
__EOF__
exit 1
exit $1
}
cmd_exclude() {
cmd_migrate_include_exclude
if [ "$LIST" ] ; then
[ $# -gt 0 ] && usage_exclude
[ $# -gt 0 ] && usage_exclude "1" >&2
show_exclude
return
fi
[ $# -lt 1 ] && usage_exclude
[ $# -lt 1 ] && usage_exclude "1" >&2
if [ "$REMOVE" ] ; then
list_delete - "$@"
else
......
......@@ -7,7 +7,10 @@ init_tests \
lbu_inc_usage \
lbu_add_usage \
lbu_commit_usage \
lbu_ci_usage
lbu_ci_usage \
lbu_exclude_usage \
lbu_ex_usage \
lbu_delete_usage
lbu_usage_body() {
test_usage lbu
......@@ -40,3 +43,20 @@ lbu_ci_usage_body() {
-e empty \
lbu ci -h
}
lbu_exclude_usage_body() {
test_usage "lbu exclude"
}
lbu_ex_usage_body() {
test_usage "lbu ex"
}
lbu_delete_usage_body() {
init_env
atf_check -s exit:0 \
-o match:"usage: lbu exclude" \
-e empty \
lbu delete -h
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment