]> git.notmuchmail.org Git - notmuch/blobdiff - test/argument-parsing
test: tests for command-line-arguments.c
[notmuch] / test / argument-parsing
diff --git a/test/argument-parsing b/test/argument-parsing
new file mode 100755 (executable)
index 0000000..672de0b
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+test_description="argument parsing"
+. ./test-lib.sh
+
+test_begin_subtest "sanity check"
+$TEST_DIRECTORY/arg-test  pos1  --keyword=one --string=foo pos2 --int=7 > OUTPUT
+cat <<EOF > EXPECTED
+keyword 1
+int 7
+string foo
+positional arg 1 pos1
+positional arg 2 pos1
+EOF
+test_expect_equal_file OUTPUT EXPECTED
+
+test_done