Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5369A431FB6 for ; Fri, 30 Dec 2011 01:39:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eaXHXO8HRvYa for ; Fri, 30 Dec 2011 01:39:46 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1D595431FD0 for ; Fri, 30 Dec 2011 01:39:45 -0800 (PST) Received: by wgbds13 with SMTP id ds13so19851416wgb.2 for ; Fri, 30 Dec 2011 01:39:45 -0800 (PST) Received: by 10.227.208.81 with SMTP id gb17mr38355354wbb.26.1325237984063; Fri, 30 Dec 2011 01:39:44 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id p2sm38862860wbh.22.2011.12.30.01.39.42 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Dec 2011 01:39:43 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id EAE66A09B7; Fri, 30 Dec 2011 09:39:40 +0000 (GMT) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 2/3 v2] test: Add tests for `notmuch-show-clean-address'. Date: Fri, 30 Dec 2011 09:39:37 +0000 Message-Id: <1325237978-22893-2-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1325237978-22893-1-git-send-email-dme@dme.org> References: <1324980940-25466-1-git-send-email-dme@dme.org> <1325237978-22893-1-git-send-email-dme@dme.org> 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.13 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, 30 Dec 2011 09:39:47 -0000 --- Added backslash test. UTF8 round-trip still isn't right. test/emacs | 20 ++++++++++++++++++++ .../notmuch-address-simplification | 10 ++++++++++ 2 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 test/emacs.expected-output/notmuch-address-simplification diff --git a/test/emacs b/test/emacs index a06c223..69738cd 100755 --- a/test/emacs +++ b/test/emacs @@ -514,4 +514,24 @@ counter=$(test_emacs \ ) test_expect_equal "$counter" 2 +test_begin_subtest "notmuch-show address simplification" +test_emacs ' +(with-temp-buffer + (let ((input (list +"foo@bar.com" +"" +"Foo Bar " +"foo@bar.com " +"ДБ " +"foo (at home) " +"foo [at home] " +"\"Foo Bar\" " +"Foo Bar" +"Fred Dibna \\[extraordinaire\\] " + ))) + (mapc (lambda (a) (insert (notmuch-show-clean-address a) "\n")) input)) + (test-output)) +' +test_expect_equal_file OUTPUT $EXPECTED/notmuch-address-simplification + test_done diff --git a/test/emacs.expected-output/notmuch-address-simplification b/test/emacs.expected-output/notmuch-address-simplification new file mode 100644 index 0000000..4747827 --- /dev/null +++ b/test/emacs.expected-output/notmuch-address-simplification @@ -0,0 +1,10 @@ +foo@bar.com +foo@bar.com +Foo Bar +foo@bar.com +ДБ +foo (at home) +foo [at home] +Foo Bar +Foo Bar +Fred Dibna [extraordinaire] -- 1.7.7.3