X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT690-command-line-args.sh;fp=test%2FT690-command-line-args.sh;h=a4f4b5f50f8da02e58761abf1457e34ee0722a12;hb=a32dd81a55a5d745dbf840b42d03e835a4e1e45c;hp=8711bec2f1d7c2c31da5f221b9aa5380aa99b175;hpb=de9baa29dc990e4166b47dc2b0d0cf560014834b;p=notmuch diff --git a/test/T690-command-line-args.sh b/test/T690-command-line-args.sh index 8711bec2..a4f4b5f5 100755 --- a/test/T690-command-line-args.sh +++ b/test/T690-command-line-args.sh @@ -3,7 +3,7 @@ test_description="command line arguments" . ./test-lib.sh || exit 1 -NOTMUCH_NEW > /dev/null +add_message test_begin_subtest 'bad option to show' notmuch show --frobnicate >& OUTPUT @@ -12,4 +12,74 @@ Unrecognized option: --frobnicate EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest 'string option with space' +cp /dev/null EXPECTED +notmuch dump --output foo.txt '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'string option with =' +cp /dev/null EXPECTED +notmuch dump --output=foo.txt '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'string option with :' +cp /dev/null EXPECTED +notmuch dump --output:foo.txt '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'single keyword option with space' +cat < EXPECTED +id:msg-001@notmuch-test-suite +EOF +notmuch search --output messages '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'single keyword option with =' +cat < EXPECTED +id:msg-001@notmuch-test-suite +EOF +notmuch search --output=messages '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'single keyword option with :' +cat < EXPECTED +id:msg-001@notmuch-test-suite +EOF +notmuch search --output:messages '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'multiple keyword options with space' +cat < EXPECTED +["msg-001@notmuch-test-suite"] +EOF +notmuch search --output messages --format json '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'multiple keyword options with =' +cat < EXPECTED +["msg-001@notmuch-test-suite"] +EOF +notmuch search --output=messages --format=json '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'mixed space and = delimiters' +cat < EXPECTED +["msg-001@notmuch-test-suite"] +EOF +notmuch search --output messages --format=json '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'mixed space and : delimiters' +cat < EXPECTED +["msg-001@notmuch-test-suite"] +EOF +notmuch search --output:messages --format json '*' >& OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest 'show --entire-thread' +test_expect_success 'notmuch show --entire-thread tag:test > /dev/null' + +test_begin_subtest 'show --exclude' +test_expect_success 'notmuch show --exclude tag:test > /dev/null' + test_done