mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-24 02:14:52 +01:00
test: add tests for --output=messages --duplicate=N
Basic smoke tests for the feature, nothing fancy.
This commit is contained in:
parent
4366b9b88c
commit
207f3bf821
1 changed files with 37 additions and 0 deletions
|
@ -122,6 +122,24 @@ id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net
|
|||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=messages --duplicate=1"
|
||||
notmuch search --output=messages --duplicate=1 '*' >OUTPUT
|
||||
# reuse same EXPECTED as above
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=messages --duplicate=2"
|
||||
notmuch search --output=messages --duplicate=2 '*' >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
id:20091117232137.GA7669@griffis1.net
|
||||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=messages --duplicate=3"
|
||||
notmuch search --output=messages --duplicate=3 '*' >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=messages --format=json"
|
||||
notmuch search --format=json --output=messages '*' >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
|
@ -180,6 +198,25 @@ cat <<EOF >EXPECTED
|
|||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=messages --format=json --duplicate=1"
|
||||
notmuch search --output=messages --format=json --duplicate=1 '*' >OUTPUT
|
||||
# reuse same EXPECTED as above
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=messages --format=json --duplicate=2"
|
||||
notmuch search --output=messages --format=json --duplicate=2 '*' >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
["20091117232137.GA7669@griffis1.net"]
|
||||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=messages --format=json --duplicate=3"
|
||||
notmuch search --output=messages --format=json --duplicate=3 '*' >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
[]
|
||||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=files"
|
||||
notmuch search --output=files '*' | notmuch_search_files_sanitize | sort >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
|
|
Loading…
Reference in a new issue