3 test_description="command line arguments"
4 . $(dirname "$0")/test-lib.sh || exit 1
8 test_begin_subtest 'bad option to show'
9 notmuch show --frobnicate >& OUTPUT
11 Unrecognized option: --frobnicate
13 test_expect_equal_file EXPECTED OUTPUT
15 test_begin_subtest 'string option with space'
17 notmuch dump --output foo.txt '*' >& OUTPUT
18 test_expect_equal_file EXPECTED OUTPUT
20 test_begin_subtest 'string option with ='
22 notmuch dump --output=foo.txt '*' >& OUTPUT
23 test_expect_equal_file EXPECTED OUTPUT
25 test_begin_subtest 'string option with :'
27 notmuch dump --output:foo.txt '*' >& OUTPUT
28 test_expect_equal_file EXPECTED OUTPUT
30 test_begin_subtest 'single keyword option with space'
32 id:msg-001@notmuch-test-suite
34 notmuch search --output messages '*' >& OUTPUT
35 test_expect_equal_file EXPECTED OUTPUT
37 test_begin_subtest 'single keyword option with ='
39 id:msg-001@notmuch-test-suite
41 notmuch search --output=messages '*' >& OUTPUT
42 test_expect_equal_file EXPECTED OUTPUT
44 test_begin_subtest 'single keyword option with :'
46 id:msg-001@notmuch-test-suite
48 notmuch search --output:messages '*' >& OUTPUT
49 test_expect_equal_file EXPECTED OUTPUT
51 test_begin_subtest 'multiple keyword options with space'
53 ["msg-001@notmuch-test-suite"]
55 notmuch search --output messages --format json '*' >& OUTPUT
56 test_expect_equal_file EXPECTED OUTPUT
58 test_begin_subtest 'multiple keyword options with ='
60 ["msg-001@notmuch-test-suite"]
62 notmuch search --output=messages --format=json '*' >& OUTPUT
63 test_expect_equal_file EXPECTED OUTPUT
65 test_begin_subtest 'mixed space and = delimiters'
67 ["msg-001@notmuch-test-suite"]
69 notmuch search --output messages --format=json '*' >& OUTPUT
70 test_expect_equal_file EXPECTED OUTPUT
72 test_begin_subtest 'mixed space and : delimiters'
74 ["msg-001@notmuch-test-suite"]
76 notmuch search --output:messages --format json '*' >& OUTPUT
77 test_expect_equal_file EXPECTED OUTPUT
79 test_begin_subtest 'show --entire-thread'
80 test_expect_success 'notmuch show --entire-thread tag:test > /dev/null'
82 test_begin_subtest 'show --exclude'
83 test_expect_success 'notmuch show --exclude tag:test > /dev/null'