summaryrefslogtreecommitdiffstats
path: root/test/inarray-test.c
diff options
context:
space:
mode:
authorAnton L. Šijanec <sijanecantonluka@gmail.com>2020-05-16 19:35:55 +0200
committerAnton L. Šijanec <sijanecantonluka@gmail.com>2020-05-16 19:35:55 +0200
commit587f44fd93a0024500418ce25bf01d0f177644f4 (patch)
tree13a981e5bc369cca8cc99ad9547d54b4c76673f5 /test/inarray-test.c
parentfix to allow nested commands (diff)
downloadbverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.gz
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.bz2
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.lz
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.xz
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.zst
bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.zip
Diffstat (limited to 'test/inarray-test.c')
-rw-r--r--test/inarray-test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/inarray-test.c b/test/inarray-test.c
new file mode 100644
index 0000000..21cb1d1
--- /dev/null
+++ b/test/inarray-test.c
@@ -0,0 +1,16 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+#include <inarray.c>
+extern int main(int argc, char* argv[]) {
+ if(argc != 3) {
+ printf("%s c string\n", argv[0]);
+ return 1;
+ }
+ if(char_in_array(argv[1][0], argv[2])) {
+ printf("%c is in %s\n", argv[1][0], argv[2]);
+ } else {
+ printf("%c is NOT in %s\n", argv[1][0], argv[2]);
+ }
+ return 0;
+}