From a755c9d6a9099366cc82ba3a4bee8e6d2b83d529 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Thu, 9 Jan 2014 17:18:59 +0200 Subject: test: renamed test scripts to format T\d\d\d-name.sh All test scripts to be executed are now named as T\d\d\d-name.sh, numers in increments of 10. This eases adding new tests and developers to see which are test scripts that are executed by test suite and in which order. --- test/T290-long-id.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 test/T290-long-id.sh (limited to 'test/T290-long-id.sh') diff --git a/test/T290-long-id.sh b/test/T290-long-id.sh new file mode 100755 index 00000000..85e620fa --- /dev/null +++ b/test/T290-long-id.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +test_description="messages with ridiculously-long message IDs" +. ./test-lib.sh + +test_begin_subtest "Referencing long ID before adding" +generate_message '[subject]="Reference of ridiculously-long message ID"' \ + "[references]=\" +output=$(NOTMUCH_NEW) +test_expect_equal "$output" "Added 1 new message to the database." + +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]=\" +output=$(NOTMUCH_NEW) +test_expect_equal "$output" "Added 1 new message to the database." + +test_begin_subtest "Ensure all messages were threaded together" +output=$(notmuch search 'subject:"a ridiculously-long message ID"' | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/3] Notmuch Test Suite; A ridiculously-long message ID (inbox unread)" + +test_done -- cgit v1.2.3