2010-12-01 21:27:52 +01:00
|
|
|
#!/usr/bin/env bash
|
2010-09-20 23:39:06 +02:00
|
|
|
test_description="messages with ridiculously-long message IDs"
|
2017-09-25 22:38:19 +02:00
|
|
|
. $(dirname "$0")/test-lib.sh || exit 1
|
2010-06-10 08:48:03 +02:00
|
|
|
|
2010-09-18 00:25:39 +02:00
|
|
|
test_begin_subtest "Referencing long ID before adding"
|
|
|
|
generate_message '[subject]="Reference of ridiculously-long message ID"' \
|
|
|
|
"[references]=\<abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-\>"
|
|
|
|
output=$(NOTMUCH_NEW)
|
|
|
|
test_expect_equal "$output" "Added 1 new message to the database."
|
2010-06-10 08:48:03 +02:00
|
|
|
|
2010-09-18 00:25:39 +02:00
|
|
|
test_begin_subtest "Adding message with long ID"
|
|
|
|
generate_message '[subject]="A ridiculously-long message ID"' \
|
|
|
|
"[id]=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"
|
|
|
|
output=$(NOTMUCH_NEW)
|
|
|
|
test_expect_equal "$output" "Added 1 new message to the database."
|
|
|
|
|
|
|
|
test_begin_subtest "Referencing long ID after adding"
|
|
|
|
generate_message '[subject]="Reply to ridiculously-long message ID"' \
|
|
|
|
"[in-reply-to]=\<abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-\>"
|
|
|
|
output=$(NOTMUCH_NEW)
|
|
|
|
test_expect_equal "$output" "Added 1 new message to the database."
|
|
|
|
|
|
|
|
test_begin_subtest "Ensure all messages were threaded together"
|
2010-09-21 01:13:15 +02:00
|
|
|
output=$(notmuch search 'subject:"a ridiculously-long message ID"' | notmuch_search_sanitize)
|
2010-09-18 00:25:39 +02:00
|
|
|
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/3] Notmuch Test Suite; A ridiculously-long message ID (inbox unread)"
|
2010-06-10 08:48:03 +02:00
|
|
|
|
|
|
|
test_done
|