mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-03 15:21:41 +01:00
test: test notmuch search --duplicate=N
Add test for notmuch search --duplicate=N option.
This commit is contained in:
parent
cc4fb2c172
commit
820a88eaaa
1 changed files with 65 additions and 0 deletions
|
@ -239,6 +239,64 @@ MAIL_DIR/cur/01:2,
|
|||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=files --duplicate=1"
|
||||
notmuch search --output=files --duplicate=1 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
MAIL_DIR/cur/52:2,
|
||||
MAIL_DIR/cur/53:2,
|
||||
MAIL_DIR/cur/50:2,
|
||||
MAIL_DIR/cur/49:2,
|
||||
MAIL_DIR/cur/48:2,
|
||||
MAIL_DIR/cur/47:2,
|
||||
MAIL_DIR/cur/46:2,
|
||||
MAIL_DIR/cur/45:2,
|
||||
MAIL_DIR/cur/44:2,
|
||||
MAIL_DIR/cur/43:2,
|
||||
MAIL_DIR/cur/42:2,
|
||||
MAIL_DIR/cur/41:2,
|
||||
MAIL_DIR/cur/40:2,
|
||||
MAIL_DIR/cur/39:2,
|
||||
MAIL_DIR/cur/38:2,
|
||||
MAIL_DIR/cur/37:2,
|
||||
MAIL_DIR/cur/36:2,
|
||||
MAIL_DIR/cur/35:2,
|
||||
MAIL_DIR/cur/34:2,
|
||||
MAIL_DIR/cur/33:2,
|
||||
MAIL_DIR/cur/32:2,
|
||||
MAIL_DIR/cur/31:2,
|
||||
MAIL_DIR/cur/30:2,
|
||||
MAIL_DIR/cur/29:2,
|
||||
MAIL_DIR/cur/28:2,
|
||||
MAIL_DIR/cur/27:2,
|
||||
MAIL_DIR/cur/26:2,
|
||||
MAIL_DIR/cur/25:2,
|
||||
MAIL_DIR/cur/24:2,
|
||||
MAIL_DIR/cur/23:2,
|
||||
MAIL_DIR/cur/22:2,
|
||||
MAIL_DIR/cur/21:2,
|
||||
MAIL_DIR/cur/19:2,
|
||||
MAIL_DIR/cur/18:2,
|
||||
MAIL_DIR/cur/20:2,
|
||||
MAIL_DIR/cur/17:2,
|
||||
MAIL_DIR/cur/16:2,
|
||||
MAIL_DIR/cur/15:2,
|
||||
MAIL_DIR/cur/14:2,
|
||||
MAIL_DIR/cur/13:2,
|
||||
MAIL_DIR/cur/12:2,
|
||||
MAIL_DIR/cur/11:2,
|
||||
MAIL_DIR/cur/10:2,
|
||||
MAIL_DIR/cur/09:2,
|
||||
MAIL_DIR/cur/08:2,
|
||||
MAIL_DIR/cur/06:2,
|
||||
MAIL_DIR/cur/05:2,
|
||||
MAIL_DIR/cur/04:2,
|
||||
MAIL_DIR/cur/03:2,
|
||||
MAIL_DIR/cur/07:2,
|
||||
MAIL_DIR/cur/02:2,
|
||||
MAIL_DIR/cur/01:2,
|
||||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=files --format=json"
|
||||
notmuch search --format=json --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
|
@ -298,6 +356,13 @@ cat <<EOF >EXPECTED
|
|||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=files --format=json --duplicate=2"
|
||||
notmuch search --format=json --output=files --duplicate=2 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
["MAIL_DIR/cur/51:2,"]
|
||||
EOF
|
||||
test_expect_equal_file OUTPUT EXPECTED
|
||||
|
||||
test_begin_subtest "--output=tags"
|
||||
notmuch search --output=tags '*' >OUTPUT
|
||||
cat <<EOF >EXPECTED
|
||||
|
|
Loading…
Reference in a new issue