diff options
Diffstat (limited to 'tests/setup_hostname_test')
-rwxr-xr-x | tests/setup_hostname_test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/setup_hostname_test b/tests/setup_hostname_test new file mode 100755 index 0000000..5b801cf --- /dev/null +++ b/tests/setup_hostname_test @@ -0,0 +1,23 @@ +#!/usr/bin/env atf-sh + +init_env() { + PATH=$(atf_get_srcdir)/..:$PATH + export ROOT=$PWD LIBDIR=$(atf_get_srcdir)/.. MOCK=echo +} + +# docs: +# - https://github.com/jmmv/kyua/wiki/Quickstart-atf-sh-test +# - https://manned.org/atf-sh-api + +atf_test_case setup_hostname_help +setup_hostname_help_body() { + init_env + atf_check -s exit:0 \ + -o match:'^usage: setup-hostname' \ + -e empty \ + setup-hostname -h +} + +atf_init_test_cases() { + atf_add_test_case setup_hostname_help +} |