mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test/sexp: tests for path, folder, including trailing '/' (sexp)
This duplicates the bug reported in [1], as well as adding some simple regression tests for 'path' and 'folder' searches which were previously missing for sexp syntax. [1]: id:cunoasuolcv.fsf@gargravarr.hh.sledj.net
This commit is contained in:
parent
053a390370
commit
c73e273aaf
1 changed files with 22 additions and 0 deletions
|
@ -185,6 +185,28 @@ notmuch search folder:'""' > EXPECTED
|
||||||
notmuch search --query=sexp '(folder "")' > OUTPUT
|
notmuch search --query=sexp '(folder "")' > OUTPUT
|
||||||
test_expect_equal_file EXPECTED OUTPUT
|
test_expect_equal_file EXPECTED OUTPUT
|
||||||
|
|
||||||
|
test_begin_subtest "Search by 'folder' with --output=files"
|
||||||
|
output=$(notmuch search --output=files --query=sexp '(folder bad/news)' | notmuch_search_files_sanitize)
|
||||||
|
test_expect_equal "$output" "MAIL_DIR/bad/news/msg-XXX
|
||||||
|
MAIL_DIR/duplicate/bad/news/msg-XXX"
|
||||||
|
|
||||||
|
test_begin_subtest "Search by 'folder' with --output=files (trailing /)"
|
||||||
|
test_subtest_known_broken
|
||||||
|
output=$(notmuch search --output=files --query=sexp '(folder bad/news/)' | notmuch_search_files_sanitize)
|
||||||
|
test_expect_equal "$output" "MAIL_DIR/bad/news/msg-XXX
|
||||||
|
MAIL_DIR/duplicate/bad/news/msg-XXX"
|
||||||
|
|
||||||
|
test_begin_subtest "Search by 'path' with --output=files"
|
||||||
|
output=$(notmuch search --output=files --query=sexp '(path bad/news)' | notmuch_search_files_sanitize)
|
||||||
|
test_expect_equal "$output" "MAIL_DIR/bad/news/msg-XXX
|
||||||
|
MAIL_DIR/duplicate/bad/news/msg-XXX"
|
||||||
|
|
||||||
|
test_begin_subtest "Search by 'path' with --output=files (trailing /)"
|
||||||
|
test_subtest_known_broken
|
||||||
|
output=$(notmuch search --output=files --query=sexp '(path bad/news/)' | notmuch_search_files_sanitize)
|
||||||
|
test_expect_equal "$output" "MAIL_DIR/bad/news/msg-XXX
|
||||||
|
MAIL_DIR/duplicate/bad/news/msg-XXX"
|
||||||
|
|
||||||
test_begin_subtest "Search by 'id'"
|
test_begin_subtest "Search by 'id'"
|
||||||
add_message '[subject]="search by id"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
|
add_message '[subject]="search by id"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
|
||||||
output=$(notmuch search --query=sexp "(id ${gen_msg_id})" | notmuch_search_sanitize)
|
output=$(notmuch search --query=sexp "(id ${gen_msg_id})" | notmuch_search_sanitize)
|
||||||
|
|
Loading…
Reference in a new issue