From: Jani Nikula Date: Fri, 25 Sep 2015 17:08:09 +0000 (+0300) Subject: [PATCH v2 7½/9] test: add notmuch address --deduplicate=(no|mailbox|address) tests X-Git-Url: http://git.tremily.us/?p=notmuch-archives.git;a=commitdiff_plain;h=5699d7cb3f6d7dea1f12531478bbd05ba36d5439 [PATCH v2 7½/9] test: add notmuch address --deduplicate=(no|mailbox|address) tests --- diff --git a/88/faf449df77873f9b5c20d5d9580971628b28ff b/88/faf449df77873f9b5c20d5d9580971628b28ff new file mode 100644 index 000000000..ab716f93c --- /dev/null +++ b/88/faf449df77873f9b5c20d5d9580971628b28ff @@ -0,0 +1,166 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 87CA76DE02D2 + for ; Fri, 25 Sep 2015 10:08:31 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.521 +X-Spam-Level: +X-Spam-Status: No, score=-0.521 tagged_above=-999 required=5 tests=[AWL=0.199, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id pJUtgyT3F1Pl for ; + Fri, 25 Sep 2015 10:08:28 -0700 (PDT) +Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com + [209.85.212.173]) + by arlo.cworth.org (Postfix) with ESMTPS id 609A96DE0298 + for ; Fri, 25 Sep 2015 10:08:28 -0700 (PDT) +Received: by wicge5 with SMTP id ge5so29495462wic.0 + for ; Fri, 25 Sep 2015 10:08:27 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to + :references:mime-version:content-type:content-transfer-encoding; + bh=Brcvb2k1mB8bqhvGDXHlWeDyVmPTCaHt1TlEi3eXIyA=; + b=R75ipx4uCsxSQ0c0VuzJHfzuy3F8Y6CLTgWFA3Gel8eE50o6gJj0KF0fcoJmr0PiCX + TM1DvnSBejKCR0ezofI2fwt0H2w/t/N77PJkJNy/YwJYuiXzWW00LCcTuItViGt590Hl + GDgcpK8ekadSQ6sI7nSG8UsQ6Dt9CNXfx3MoV/LUNdmWh2v1wLM1VhqWTwGFEROugLR/ + QTGLz+IRdqM27Nq2K9IwEdHb296g9yTD204260mE+b3gbpoEqMDBaCw/b1enWUpJtVe7 + 99Pi1vQ+H53UiN25JNv/7pfhHMYNnsuQ+dhjrgoTObJHHpyq5+qV579X46HsitAptSjr + 9ICw== +X-Gm-Message-State: + ALoCoQmBs5USjspCRVk4dvu7pnR4JfapbKm21nnOn4FoRncfFLOuhFYLz89Qioer3rA5BxlJ2D6N +X-Received: by 10.194.83.70 with SMTP id o6mr7418689wjy.44.1443200906920; + Fri, 25 Sep 2015 10:08:26 -0700 (PDT) +Received: from localhost (mobile-access-bcee63-221.dhcp.inet.fi. + [188.238.99.221]) + by smtp.gmail.com with ESMTPSA id 12sm4272173wjw.15.2015.09.25.10.08.26 + (version=TLSv1/SSLv3 cipher=OTHER); + Fri, 25 Sep 2015 10:08:26 -0700 (PDT) +From: Jani Nikula +To: David Bremner , Jani Nikula , + notmuch@notmuchmail.org +Subject: =?utf-8?q?=5BPATCH_v2_7=C2=BD/9=5D_test=3A_add_notmuch_address_--deduplicate=3D=28no=7Cmailbox=7Caddress=29_tests?= +Date: Fri, 25 Sep 2015 20:08:09 +0300 +Message-Id: <1443200889-19053-1-git-send-email-jani@nikula.org> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <87612z2wo7.fsf@zancas.localnet> +References: <87612z2wo7.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 25 Sep 2015 17:08:31 -0000 + +First a simple smoke test first, next generate messages with multiple +email address variants and check the behaviour of deduplication +schemes with these. + +--- + +v2: more variation in name parts of email addresses +--- + test/T095-address.sh | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + +diff --git a/test/T095-address.sh b/test/T095-address.sh +index f8d902cb3a5e..a194faf3b842 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 +-- +2.1.4 +