]> git.notmuchmail.org Git - notmuch/blobdiff - test/T100-search-by-folder.sh
test: known broken tests for trailing / in path search (infix)
[notmuch] / test / T100-search-by-folder.sh
index fc9ad5f80387583cd3a3743f3749c592f4d8011c..fbc682668903bc0c73dbee5404a915002590fcc6 100755 (executable)
@@ -31,6 +31,12 @@ output=$(notmuch search --output=files folder:bad/news | notmuch_search_files_sa
 test_expect_equal "$output" "MAIL_DIR/bad/news/msg-XXX
 MAIL_DIR/duplicate/bad/news/msg-XXX"
 
+test_begin_subtest "Folder search with --output=files (trailing /)"
+test_subtest_known_broken
+output=$(notmuch search --output=files 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 "After removing duplicate instance of matching path"
 rm -r "${MAIL_DIR}/bad/news"
 notmuch new
@@ -120,6 +126,14 @@ test_expect_equal "$output" "MAIL_DIR/bar/17:2,
 MAIL_DIR/bar/18:2,
 MAIL_DIR/cur/51:2,"
 
+test_begin_subtest "path: search (trailing /)"
+test_subtest_known_broken
+output=$(notmuch search --output=files path:"bar/" | notmuch_search_files_sanitize | sort)
+# cur/51:2, is a duplicate of bar/18:2,
+test_expect_equal "$output" "MAIL_DIR/bar/17:2,
+MAIL_DIR/bar/18:2,
+MAIL_DIR/cur/51:2,"
+
 test_begin_subtest "top level path: search"
 output=$(notmuch search --output=files path:'""' | notmuch_search_files_sanitize | sort)
 test_expect_equal "$output" "MAIL_DIR/01:2,