[PATCH 3½/9] test: notmuch address --deduplicate=no tests

Jani Nikula jani at nikula.org
Wed Sep 23 11:56:11 PDT 2015


On Sun, 20 Sep 2015, David Bremner <david at tethera.net> wrote:
> Jani Nikula <jani at nikula.org> writes:
>
>> Test not using address deduplication. Incorporate some trivial output
>> sorting tests here, as they seem to lack tests.
>> ---
>>  test/T095-address.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 70 insertions(+)
>>
>> diff --git a/test/T095-address.sh b/test/T095-address.sh
>> index 8eecb2a6a7ba..f8d902cb3a5e 100755
>> --- a/test/T095-address.sh
>> +++ b/test/T095-address.sh
>> @@ -145,4 +145,74 @@ cat <<EOF >EXPECTED
>>  EOF
>>  test_expect_equal_file OUTPUT EXPECTED
>>  
>> +test_begin_subtest "--deduplicate=no --sort=oldest-first --output=sender"
>> +notmuch address --deduplicate=no --sort=oldest-first --output=sender '*' >OUTPUT
>> +cat <<EOF >EXPECTED
>> +Mikhail Gusarov <dottedmag at dottedmag.net>
>> +Mikhail Gusarov <dottedmag at dottedmag.net>
>> +Carl Worth <cworth at cworth.org>
>
>> +
>> +test_begin_subtest "--deduplicate=no --sort=newest-first --output=sender --output=recipients"
>> +notmuch address --deduplicate=no --sort=newest-first --output=sender --output=recipients path:foo/new >OUTPUT
>> +cat <<EOF >EXPECTED
>> +Mikhail Gusarov <dottedmag at dottedmag.net>
>> +notmuch at notmuchmail.org
>> +Mikhail Gusarov <dottedmag at dottedmag.net>
>
> Two comments:
>
> 1) It's suprising that Mikail is first in both the newest-first and
> oldest-first list. Is it easy to explain why?
>
> 2) the use of path: term is not mentioned in the description. Should it
> be mentioned somehow?

I wanted to have a smaller set of results in the second test, and path:
was an easy filter so I could look at the files there to construct the
expected results. That also explains the first part; it just so happened
that the folder I arbitrarily picked happened to have Mikail there.

BR,
Jani.


>
> d


More information about the notmuch mailing list