abuild/tests/abuild_test
2022-06-22 16:13:07 +02:00

30 lines
470 B
Plaintext
Executable File

#!/usr/bin/env atf-sh
. $(atf_get_srcdir)/test_env.sh
init_tests \
abuild_help \
abuild_invalid_opt \
abuild_version
DATADIR=$(atf_get_srcdir)/testdata
export ABUILD_SHAREDIR=$(atf_get_srcdir)/..
abuild_help_body() {
atf_check -s exit:0 \
-o match:"usage:" \
abuild -h
}
abuild_invalid_opt_body() {
atf_check -s exit:1 \
-e match:"usage:" \
abuild -@
}
abuild_version_body() {
atf_check -s exit:0 \
-o match:"abuild [0-9]+\.[0-9]+" \
abuild -V
}