diff --git a/test/T095-address.sh b/test/T095-address.sh index f8d902cb..a194faf3 100755 --- a/test/T095-address.sh +++ b/test/T095-address.sh @@ -215,4 +215,78 @@ notmuch@notmuchmail.org EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "--deduplicate=address --output=sender --output=recipients" +notmuch address --deduplicate=address --output=sender --output=recipients '*' | sort >OUTPUT +cat <EXPECTED +"Discussion about the Arch User Repository (AUR)" +Adrian Perez de Castro +Alexander Botero-Lowry +Allan McRae +Aron Griffis +Carl Worth +Chris Wilson +François Boulogne +Ingmar Vanhassel +Israel Herraiz +Jan Janak +Jjgod Jiang +Keith Packard +Lars Kellogg-Stedman +Mikhail Gusarov +Olivier Berger +Rolland Santimano +Stewart Smith +notmuch@notmuchmail.org +EOF +test_expect_equal_file OUTPUT EXPECTED + +generate_message '[from]="Foo Bar "' +generate_message '[from]="Foo Bar "' +generate_message '[from]="Foo Bar "' +generate_message '[from]="Bar "' +generate_message '[from]="Foo "' +generate_message '[from]=""' +generate_message '[from]="foo.bar@example.com"' +generate_message '[from]="Baz "' +generate_message '[from]="Foo Bar "' +generate_message '[from]="Baz "' +notmuch new > /dev/null + +test_begin_subtest "--deduplicate=no --output=sender" +notmuch address --deduplicate=no --output=sender from:example.com | sort >OUTPUT +cat <EXPECTED +Bar +Baz +Baz +Foo +Foo Bar +Foo Bar +Foo Bar +Foo Bar +foo.bar@example.com +foo.bar@example.com +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "--deduplicate=mailbox --output=sender --output=count" +notmuch address --deduplicate=mailbox --output=sender --output=count from:example.com | sort -n >OUTPUT +cat <EXPECTED +1 Bar +1 Foo +1 Foo Bar +1 Foo Bar +2 Baz +2 Foo Bar +2 foo.bar@example.com +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "--deduplicate=address --output=sender --output=count" +notmuch address --deduplicate=address --output=sender --output=count from:example.com | sort -n >OUTPUT +cat <EXPECTED +3 Baz +7 Foo Bar +EOF +test_expect_equal_file OUTPUT EXPECTED + test_done