summaryrefslogtreecommitdiffstats
path: root/test/inarray-test.c
diff options
context:
space:
mode:
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;
+}