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 A62A140EC28 for ; Wed, 25 Jan 2012 07:45:36 -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 wQgScIIXFCgC for ; Wed, 25 Jan 2012 07:45:35 -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 CF87A429E3C for ; Wed, 25 Jan 2012 07:45:34 -0800 (PST) Received: by wgbdt12 with SMTP id dt12so4941154wgb.2 for ; Wed, 25 Jan 2012 07:45:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.95.105 with SMTP id dj9mr28891128wib.18.1327506333716; Wed, 25 Jan 2012 07:45:33 -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 u12sm478657wiv.10.2012.01.25.07.45.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Jan 2012 07:45:32 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id DB8429FF26; Wed, 25 Jan 2012 15:45:29 +0000 (GMT) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 3/4 v2] test: Add test for Original Message hiding at point-min. Date: Wed, 25 Jan 2012 15:45:27 +0000 Message-Id: <1327506328-22126-4-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1327506328-22126-1-git-send-email-dme@dme.org> References: <1327503908-17226-1-git-send-email-dme@dme.org> <1327506328-22126-1-git-send-email-dme@dme.org> X-Gm-Message-State: ALoCoQm5GIToB4WflBquurE/ckgGGSGWV4qbycJx5/fnLUq/2UpBw1aIUZNpSlXUP8TTtXGehCLK 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: Wed, 25 Jan 2012 15:45:37 -0000 --- test/emacs-original-message-hiding.el | 15 +++++++++++++++ test/emacs-original-message-hiding.sh | 20 ++++++++++++++++++++ test/notmuch-test | 1 + 3 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 test/emacs-original-message-hiding.el create mode 100755 test/emacs-original-message-hiding.sh diff --git a/test/emacs-original-message-hiding.el b/test/emacs-original-message-hiding.el new file mode 100644 index 0000000..bbacbeb --- /dev/null +++ b/test/emacs-original-message-hiding.el @@ -0,0 +1,15 @@ +(defun notmuch-test-original-message-hiding () + (let ((notmuch-show-insert-text/plain-hook '(notmuch-wash-excerpt-citations)) + (expected "\ +Sender (2010-01-05) (inbox) +Subject: hiding an Original Message +To: mailinglist@notmuchmail.org +Date: Tue, 05 Jan 2010 15:43:56 -0000 + +[ 2-line hidden original message. Click/Enter to show. ] + +") + output) + (notmuch-show "id:\"test_message@test.org\"") + (setq output (visible-buffer-string)) + (notmuch-test-expect-equal output expected))) diff --git a/test/emacs-original-message-hiding.sh b/test/emacs-original-message-hiding.sh new file mode 100755 index 0000000..01cf98d --- /dev/null +++ b/test/emacs-original-message-hiding.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +test_description="emacs Original Message hiding" +. test-lib.sh + +test_begin_subtest "Hiding an Original Message region at point-min" +add_message \ + '[id]="test_message@test.org"' \ + '[from]="Sender "' \ + '[to]=mailinglist@notmuchmail.org' \ + '[subject]="hiding an Original Message"' \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="-----Original Message----- +Text here. +"' +test_subtest_known_broken +test_emacs_expect_t \ + '(load "emacs-original-message-hiding.el") (notmuch-test-original-message-hiding)' + +test_done diff --git a/test/notmuch-test b/test/notmuch-test index 3f1740c..af132fc 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -54,6 +54,7 @@ TESTS=" argument-parsing emacs-test-functions.sh emacs-address-cleaning.sh + emacs-original-message-hiding.sh " TESTS=${NOTMUCH_TESTS:=$TESTS} -- 1.7.8.3