First a simple smoke test first, next generate messages with multiple email address variants and check the behaviour of deduplication schemes with these. --- test/T095-address.sh | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)
diff --git a/test/T095-address.sh b/test/T095-address.sh index f8d902cb3a5e..54ac713a5227 100755 --- a/test/T095-address.sh +++ b/test/T095-address.sh @@ -215,4 +215,67 @@ [email protected] 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 <<EOF >EXPECTED +"Discussion about the Arch User Repository (AUR)" <[email protected]> +Adrian Perez de Castro <[email protected]> +Alexander Botero-Lowry <[email protected]> +Allan McRae <[email protected]> +Aron Griffis <[email protected]> +Carl Worth <[email protected]> +Chris Wilson <[email protected]> +François Boulogne <[email protected]> +Ingmar Vanhassel <[email protected]> +Israel Herraiz <[email protected]> +Jan Janak <[email protected]> +Jjgod Jiang <[email protected]> +Keith Packard <[email protected]> +Lars Kellogg-Stedman <[email protected]> +Mikhail Gusarov <[email protected]> +Olivier Berger <[email protected]> +Rolland Santimano <[email protected]> +Stewart Smith <[email protected]> [email protected] +EOF +test_expect_equal_file OUTPUT EXPECTED + +generate_message '[from]="Foo Bar <[email protected]>"' +generate_message '[from]="Foo Bar <[email protected]>"' +generate_message '[from]="Foo Bar <[email protected]>"' +generate_message '[from]="<[email protected]>"' +generate_message '[from]="[email protected]"' +generate_message '[from]="Foo Bar <[email protected]>"' +notmuch new > /dev/null + +test_begin_subtest "--deduplicate=no --output=sender" +notmuch address --deduplicate=no --output=sender from:example.com | sort >OUTPUT +cat <<EOF >EXPECTED +Foo Bar <[email protected]> +Foo Bar <[email protected]> +Foo Bar <[email protected]> +Foo Bar <[email protected]> [email protected] [email protected] +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 <<EOF >EXPECTED +1 Foo Bar <[email protected]> +1 Foo Bar <[email protected]> +2 Foo Bar <[email protected]> +2 [email protected] +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 <<EOF >EXPECTED +1 Foo Bar <[email protected]> +5 Foo Bar <[email protected]> +EOF +test_expect_equal_file OUTPUT EXPECTED + test_done -- 2.1.4 _______________________________________________ notmuch mailing list [email protected] http://notmuchmail.org/mailman/listinfo/notmuch
