test: insert into the folder with trailing /
authorYuri Volchkov <yuri.volchkov@gmail.com>
Sat, 12 Aug 2017 16:47:30 +0000 (18:47 +0200)
committerDavid Bremner <david@tethera.net>
Sun, 20 Aug 2017 11:28:55 +0000 (08:28 -0300)
From database's point of view, "Drafts" and "Drafts/" are different
folders

Signed-off-by: Yuri Volchkov <yuri.volchkov@gmail.com>
Amended: add test_subtest_known_broken (db)

test/T070-insert.sh

index 48f212ee09283f45468a405c55544223c31daf0f..187dfd377b1560e95d3c4eb165bfd95fc8210ac5 100755 (executable)
@@ -132,6 +132,14 @@ output=$(notmuch search --output=files path:Drafts/new)
 dirname=$(dirname "$output")
 test_expect_equal "$dirname" "$MAIL_DIR/Drafts/new"
 
+test_begin_subtest "Insert message into folder with trailing /"
+test_subtest_known_broken
+gen_insert_msg
+notmuch insert --folder=Drafts/ < "$gen_msg_filename"
+output=$(notmuch search --output=files id:${gen_msg_id})
+dirname=$(dirname "$output")
+test_expect_equal "$dirname" "$MAIL_DIR/Drafts/new"
+
 test_begin_subtest "Insert message into folder, add/remove tags"
 gen_insert_msg
 notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename"