summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-07-01 15:28:08 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-07-01 15:30:06 +0200
commit8f4068a52481a316a358eefb1cc27ab7133c4d66 (patch)
tree48afd8451db528f55b260a0d176bd6b52d061556
parent11492f2e2adc07fce1e98e09c88ee518c8b448ac (diff)
downloadalpine-conf-8f4068a52481a316a358eefb1cc27ab7133c4d66.zip
tests: libalpine: add tests for isin
-rwxr-xr-xtests/libalpine_test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/libalpine_test b/tests/libalpine_test
new file mode 100755
index 0000000..6611cac
--- /dev/null
+++ b/tests/libalpine_test
@@ -0,0 +1,15 @@
+#!/usr/bin/env atf-sh
+
+. $(atf_get_srcdir)/test_env.sh
+init_tests \
+ libalpine_isin
+
+libalpine=$(atf_get_srcdir)/../libalpine.sh
+
+libalpine_isin_body() {
+ . "$libalpine"
+ isin a a b c || atf_fail "isin a a b c"
+ ! isin foo bar baz a a b c || atf_fail" isin foo bar baz a a b c"
+ isin "with space" foo "with space" "other space" || atf_fail 'isin "with space" foo "with space" "other space'
+}
+