summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-12 09:38:50 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-05-12 09:38:50 +0200
commitaca2472f614d1a166364a968973850aa00d02d38 (patch)
tree5429fd5ef7d128aac28be8ef1d4187ff4a25c6fa
parent6e7684fe3952ca1d3efd7cf61b31f89447bb6ef1 (diff)
downloadalpine-conf-aca2472f614d1a166364a968973850aa00d02d38.zip
tests: add test for setup-devd
only test the help text for now
-rwxr-xr-xtests/setup_devd_test23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/setup_devd_test b/tests/setup_devd_test
new file mode 100755
index 0000000..fe61abe
--- /dev/null
+++ b/tests/setup_devd_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_devd_usage
+setup_devd_usage_body() {
+ init_env
+ atf_check -s exit:0 \
+ -o match:'^usage: setup-devd' \
+ -e empty \
+ setup-devd -h
+}
+
+atf_init_test_cases() {
+ atf_add_test_case setup_devd_usage
+}