From 5800a44bd5b77390d2243426f0c82de4d0495a1c Mon Sep 17 00:00:00 2001 From: David Bremner Date: Wed, 7 Dec 2011 14:37:13 -0400 Subject: test: tests for command-line-arguments.c This was needed because no current notmuch code exercises the NOTMUCH_OPT_STRING style arguments. --- test/argument-parsing | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 test/argument-parsing (limited to 'test/argument-parsing') diff --git a/test/argument-parsing b/test/argument-parsing new file mode 100755 index 00000000..672de0b3 --- /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 < EXPECTED +keyword 1 +int 7 +string foo +positional arg 1 pos1 +positional arg 2 pos1 +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_done -- cgit v1.2.3