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 AB470431FC2 for ; Sat, 23 Jun 2012 20:28:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 0OA9pHpLmsKV for ; Sat, 23 Jun 2012 20:28:25 -0700 (PDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B04CA431FBD for ; Sat, 23 Jun 2012 20:28:25 -0700 (PDT) Received: by mail-pb0-f53.google.com with SMTP id rr13so6402052pbb.26 for ; Sat, 23 Jun 2012 20:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=1a4IzYi5jOEKR9XQ0XOE50dkPXhspg+5Zl1iVOfjexk=; b=Q2XFWd3vLGV5ZPUStG5GCCi+6XwD4nyVeoLDDjiwjITtWZspqhcsq9Fy+5wNALUtzE 0ckRJGA8jhQYa5sckeSieW2pKvQFbaqPRrsR9wXeRpdvDhQmVpIgOrIN3KTuMG5tpPJY huufg6Di0b8sRvMxs5PLDre3NAsHwHXFEaCMXOMFKs5MUDuFVR8Y+JD2KIZUdMbnPauo POqFuRMlUMDEaUiwepPz2k5GlYbObSN4bf/0wajV6AXHXPq+O0cdV0wGAthquUQSywfK 2qXcdQ8wzvLi8f5vm/ZqKL4JRHMSbpwSqFHOO95DXWRIspaJZKfWSoF+QGr5htt7VdV2 6FAA== Received: by 10.68.203.7 with SMTP id km7mr26526742pbc.7.1340508505395; Sat, 23 Jun 2012 20:28:25 -0700 (PDT) Received: from localhost (215.42.233.220.static.exetel.com.au. [220.233.42.215]) by mx.google.com with ESMTPS id op10sm4072001pbc.75.2012.06.23.20.28.22 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Jun 2012 20:28:24 -0700 (PDT) From: Peter Wang To: notmuch@notmuchmail.org Subject: [PATCH 3/3] test: add test for showing Reply-To headers Date: Sun, 24 Jun 2012 13:27:50 +1000 Message-Id: <1340508470-16606-3-git-send-email-novalazy@gmail.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1340508470-16606-1-git-send-email-novalazy@gmail.com> References: <1340508470-16606-1-git-send-email-novalazy@gmail.com> 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: Sun, 24 Jun 2012 03:28:26 -0000 Test that show --format=text and --format=json now output Reply-To headers when present. --- test/json | 4 ++-- test/text | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/json b/test/json index 6439788..0a692ac 100755 --- a/test/json +++ b/test/json @@ -3,9 +3,9 @@ test_description="--format=json output" . ./test-lib.sh test_begin_subtest "Show message: json" -add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\"" +add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\"" "[reply-to]=\"json-show-reply-to\"" output=$(notmuch show --format=json "json-show-message") -test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite \", \"To\": \"Notmuch Test Suite \", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]" +test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite \", \"To\": \"Notmuch Test Suite \", \"Reply-To\": \"json-show-reply-to\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]" test_begin_subtest "Search message: json" add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\"" diff --git a/test/text b/test/text index 428c89b..bf1dfd1 100755 --- a/test/text +++ b/test/text @@ -3,7 +3,7 @@ test_description="--format=text output" . ./test-lib.sh test_begin_subtest "Show message: text" -add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\"" +add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\"" "[reply-to]=\"text-show-reply-to\"" output=$(notmuch show --format=text "text-show-message" | notmuch_show_sanitize_all) test_expect_equal "$output" "\ message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX @@ -12,6 +12,7 @@ Notmuch Test Suite (2000-01-01) (inbox unread) Subject: text-show-subject From: Notmuch Test Suite To: Notmuch Test Suite +Reply-To: text-show-reply-to Date: Sat, 01 Jan 2000 12:00:00 +0000 header} body{ -- 1.7.4.4