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 D6793431FD0 for ; Tue, 27 Dec 2011 02:15:46 -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 kpO7-J0jrBcx for ; Tue, 27 Dec 2011 02:15:46 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C5C54431FB6 for ; Tue, 27 Dec 2011 02:15:45 -0800 (PST) Received: by wibhq2 with SMTP id hq2so5887214wib.26 for ; Tue, 27 Dec 2011 02:15:44 -0800 (PST) Received: by 10.180.19.74 with SMTP id c10mr60079321wie.8.1324980944670; Tue, 27 Dec 2011 02:15: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 dj9sm64328327wib.6.2011.12.27.02.15.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Dec 2011 02:15:43 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id 4FA42A04BC; Tue, 27 Dec 2011 10:15:41 +0000 (GMT) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 1/3] test: Add tests for `notmuch-show-clean-address'. Date: Tue, 27 Dec 2011 10:15:38 +0000 Message-Id: <1324980940-25466-1-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.7.3 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: Tue, 27 Dec 2011 10:15:47 -0000 --- The address containing UTF-8 still fails. This looks like a failure to properly round-trip UTF-8 in the test suite - the test passes if run directly within emacs. test/emacs | 19 +++++++++++++++++++ .../notmuch-address-simplification | 9 +++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 test/emacs.expected-output/notmuch-address-simplification diff --git a/test/emacs b/test/emacs index ca82445..bb4a75f 100755 --- a/test/emacs +++ b/test/emacs @@ -514,4 +514,23 @@ 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" + ))) + (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..0afe190 --- /dev/null +++ b/test/emacs.expected-output/notmuch-address-simplification @@ -0,0 +1,9 @@ +foo@bar.com +foo@bar.com +Foo Bar +foo@bar.com +ДБ +foo (at home) +foo [at home] +Foo Bar +Foo Bar -- 1.7.7.3