test: known broken test for subject after reindexing
authorDavid Bremner <david@tethera.net>
Sun, 27 Aug 2017 23:58:21 +0000 (20:58 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 6 Sep 2017 00:51:21 +0000 (21:51 -0300)
In [1], Mark gave a test that was behaving strangly. This turns out to
be specific to reindexing.  I suppose one could argue that picking the
lexicographically last file name is a defensible choice, but it's
almost as easy to take the first, which seems more intuitive. So mark
the current situation as broken.

[1]: id:1503859703-2973-1-git-send-email-markwalters1009@gmail.com

test/T670-duplicate-mid.sh

index d2f894327c7f50da947ac3f7b742a58285655b1f..d4c1d1c22358c341cd0bc28c8b91685ed6198b3c 100755 (executable)
@@ -40,6 +40,14 @@ notmuch reindex '*'
 notmuch search --output=files "sekrit" | notmuch_dir_sanitize > OUTPUT
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest 'reindex choses subject from first filename'
+test_subtest_known_broken
+cat <<EOF > EXPECTED
+thread:XXX   2001-01-05 [1/1(3)] Notmuch Test Suite; message 0 (inbox unread)
+EOF
+notmuch search id:duplicate | notmuch_search_sanitize > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
 rm ${MAIL_DIR}/copy0
 test_begin_subtest 'Deleted first duplicate file does not stop notmuch show from working'
 output=$(notmuch show --body=false --format=json id:duplicate |