X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Fthread-naming;h=942e5939764d4d611f385b33384530cdd7793a70;hp=987c3b331a4a2ccbbf5b20f6d4bc99f314bdf35c;hb=d8b131c37dccf3c09a61dbd10b543b75903d9e76;hpb=24d42f05075ddeb6783ae99b8f8fc2df059fcd22 diff --git a/test/thread-naming b/test/thread-naming index 987c3b33..942e5939 100755 --- a/test/thread-naming +++ b/test/thread-naming @@ -1,25 +1,22 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="naming of threads with changing subject" . ./test-lib.sh -test_begin_subtest 'Generate some messages' +test_begin_subtest "Initial thread name (oldest-first search)" add_message '[subject]="thread-naming: Initial thread subject"' \ - '[date]="Fri, 05 Jan 2001 15:43:56 -0000"' + '[date]="Fri, 05 Jan 2001 15:43:56 -0000"' first=${gen_msg_cnt} parent=${gen_msg_id} add_message '[subject]="thread-naming: Older changed subject"' \ - '[date]="Sat, 06 Jan 2001 15:43:56 -0000"' \ - "[in-reply-to]=\<$parent\>" + '[date]="Sat, 06 Jan 2001 15:43:56 -0000"' \ + "[in-reply-to]=\<$parent\>" add_message '[subject]="thread-naming: Newer changed subject"' \ - '[date]="Sun, 07 Jan 2001 15:43:56 -0000"' \ - "[in-reply-to]=\<$parent\>" + '[date]="Sun, 07 Jan 2001 15:43:56 -0000"' \ + "[in-reply-to]=\<$parent\>" add_message '[subject]="thread-naming: Final thread subject"' \ - '[date]="Mon, 08 Jan 2001 15:43:56 -0000"' \ - "[in-reply-to]=\<$parent\>" + '[date]="Mon, 08 Jan 2001 15:43:56 -0000"' \ + "[in-reply-to]=\<$parent\>" final=${gen_msg_id} -test_expect_equal '' '' - -test_begin_subtest "Initial thread name (oldest-first search)" output=$(notmuch search --sort=oldest-first thread-naming and tag:inbox | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-05 [4/4] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)" @@ -40,29 +37,29 @@ test_expect_equal "$output" "thread:XXX 2001-01-07 [2/4] Notmuch Test Suite; t test_begin_subtest "Ignore added reply prefix (Re:)" add_message '[subject]="Re: thread-naming: Initial thread subject"' \ - '[date]="Tue, 09 Jan 2001 15:43:45 -0000"' \ - "[in-reply-to]=\<$parent\>" + '[date]="Tue, 09 Jan 2001 15:43:45 -0000"' \ + "[in-reply-to]=\<$parent\>" output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-09 [3/5] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)" test_begin_subtest "Ignore added reply prefix (Aw:)" add_message '[subject]="Aw: thread-naming: Initial thread subject"' \ - '[date]="Wed, 10 Jan 2001 15:43:45 -0000"' \ - "[in-reply-to]=\<$parent\>" + '[date]="Wed, 10 Jan 2001 15:43:45 -0000"' \ + "[in-reply-to]=\<$parent\>" output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-10 [4/6] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)" test_begin_subtest "Ignore added reply prefix (Vs:)" add_message '[subject]="Vs: thread-naming: Initial thread subject"' \ - '[date]="Thu, 11 Jan 2001 15:43:45 -0000"' \ - "[in-reply-to]=\<$parent\>" + '[date]="Thu, 11 Jan 2001 15:43:45 -0000"' \ + "[in-reply-to]=\<$parent\>" output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-11 [5/7] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)" test_begin_subtest "Ignore added reply prefix (Sv:)" add_message '[subject]="Sv: thread-naming: Initial thread subject"' \ - '[date]="Fri, 12 Jan 2001 15:43:45 -0000"' \ - "[in-reply-to]=\<$parent\>" + '[date]="Fri, 12 Jan 2001 15:43:45 -0000"' \ + "[in-reply-to]=\<$parent\>" output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-12 [6/8] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)" @@ -74,7 +71,7 @@ Notmuch Test Suite (2001-01-05) (unread) Subject: thread-naming: Initial thread subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Fri, 05 Jan 2001 15:43:56 -0000 +Date: Fri, 05 Jan 2001 15:43:56 +0000 header} body{ part{ ID: 1, Content-type: text/plain @@ -88,7 +85,7 @@ Notmuch Test Suite (2001-01-06) (inbox unread) Subject: thread-naming: Older changed subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Sat, 06 Jan 2001 15:43:56 -0000 +Date: Sat, 06 Jan 2001 15:43:56 +0000 header} body{ part{ ID: 1, Content-type: text/plain @@ -102,7 +99,7 @@ Notmuch Test Suite (2001-01-07) (inbox unread) Subject: thread-naming: Newer changed subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Sun, 07 Jan 2001 15:43:56 -0000 +Date: Sun, 07 Jan 2001 15:43:56 +0000 header} body{ part{ ID: 1, Content-type: text/plain @@ -116,7 +113,7 @@ Notmuch Test Suite (2001-01-08) (unread) Subject: thread-naming: Final thread subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Mon, 08 Jan 2001 15:43:56 -0000 +Date: Mon, 08 Jan 2001 15:43:56 +0000 header} body{ part{ ID: 1, Content-type: text/plain @@ -130,7 +127,7 @@ Notmuch Test Suite (2001-01-09) (inbox unread) Subject: Re: thread-naming: Initial thread subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Tue, 09 Jan 2001 15:43:45 -0000 +Date: Tue, 09 Jan 2001 15:43:45 +0000 header} body{ part{ ID: 1, Content-type: text/plain @@ -144,7 +141,7 @@ Notmuch Test Suite (2001-01-10) (inbox unread) Subject: Aw: thread-naming: Initial thread subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Wed, 10 Jan 2001 15:43:45 -0000 +Date: Wed, 10 Jan 2001 15:43:45 +0000 header} body{ part{ ID: 1, Content-type: text/plain @@ -158,7 +155,7 @@ Notmuch Test Suite (2001-01-11) (inbox unread) Subject: Vs: thread-naming: Initial thread subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Thu, 11 Jan 2001 15:43:45 -0000 +Date: Thu, 11 Jan 2001 15:43:45 +0000 header} body{ part{ ID: 1, Content-type: text/plain @@ -172,7 +169,7 @@ Notmuch Test Suite (2001-01-12) (inbox unread) Subject: Sv: thread-naming: Initial thread subject From: Notmuch Test Suite To: Notmuch Test Suite -Date: Fri, 12 Jan 2001 15:43:45 -0000 +Date: Fri, 12 Jan 2001 15:43:45 +0000 header} body{ part{ ID: 1, Content-type: text/plain