aboutsummaryrefslogtreecommitdiff
path: root/test/argument-parsing
diff options
context:
space:
mode:
authorDavid Bremner <bremner@debian.org>2011-12-07 14:37:13 -0400
committerDavid Bremner <bremner@debian.org>2011-12-08 20:24:24 -0400
commit5800a44bd5b77390d2243426f0c82de4d0495a1c (patch)
treef20c58811ce59533a1cf05697fb21febdee66e1e /test/argument-parsing
parent2cf7b27a0c4b4e746e2e40752c55ddb4d54798b2 (diff)
test: tests for command-line-arguments.c
This was needed because no current notmuch code exercises the NOTMUCH_OPT_STRING style arguments.
Diffstat (limited to 'test/argument-parsing')
-rwxr-xr-xtest/argument-parsing16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/argument-parsing b/test/argument-parsing
new file mode 100755
index 0000000..672de0b
--- /dev/null
+++ b/test/argument-parsing
@@ -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