[PATCH 1/2] test: date_relative in notmuch search json output
authorpazz <patricktotzke@googlemail.com>
Sat, 23 Jul 2011 09:54:03 +0000 (10:54 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:12 +0000 (09:39 -0800)
98/f947e74d515b533547d4e7fc80c2b0edd4f69b [new file with mode: 0644]

diff --git a/98/f947e74d515b533547d4e7fc80c2b0edd4f69b b/98/f947e74d515b533547d4e7fc80c2b0edd4f69b
new file mode 100644 (file)
index 0000000..2a4ef03
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <patricktotzke@googlemail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 50E65429E28\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jul 2011 02:54:28 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id g-hM6AF+QIsZ for <notmuch@notmuchmail.org>;\r
+       Sat, 23 Jul 2011 02:54:27 -0700 (PDT)\r
+Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id AAE9E431FD0\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jul 2011 02:54:16 -0700 (PDT)\r
+Received: by wyh22 with SMTP id 22so2256890wyh.26\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jul 2011 02:54:15 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=googlemail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :mime-version:content-type:content-transfer-encoding;\r
+       bh=AeXkistFG+jEhuxxyZOrzmPuODumbPiadk9NcqeVbNQ=;\r
+       b=kC3T+YFb6qDryGn2gxGY4HhOwn417ENdzlQGmhl5j/cxLo+IKJVzYBwCTFrroMdvMl\r
+       fad0uwJefA7ToyhokAESRdYHs5wTQ77LDR+U8R7Vtq5nHQ97A/Dcv29MGNeJAhHmwoZt\r
+       ktX0Nc3wurPMLKddR9iPahhYob2dj6YNsOUUQ=\r
+Received: by 10.216.79.5 with SMTP id h5mr1980612wee.110.1311414855010;\r
+       Sat, 23 Jul 2011 02:54:15 -0700 (PDT)\r
+Received: from localhost (cpc1-sgyl2-0-0-cust47.sgyl.cable.virginmedia.com\r
+       [80.192.18.48])\r
+       by mx.google.com with ESMTPS id l55sm820635wed.41.2011.07.23.02.54.12\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sat, 23 Jul 2011 02:54:14 -0700 (PDT)\r
+From: pazz <patricktotzke@googlemail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] test: date_relative in notmuch search json output\r
+Date: Sat, 23 Jul 2011 10:54:03 +0100\r
+Message-Id: <1311414844-12378-1-git-send-email-patricktotzke@gmail.com>\r
+X-Mailer: git-send-email 1.7.4.1\r
+In-Reply-To: <20110715210459.GA12727@brick.lan>\r
+References: <20110715210459.GA12727@brick.lan>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 23 Jul 2011 09:54:28 -0000\r
+\r
+expect the date_relative field for thread entries\r
+in notmuch search's json output\r
+---\r
+ test/json |    2 ++\r
+ 1 files changed, 2 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/json b/test/json\r
+index 5a2544c..d54bf25 100755\r
+--- a/test/json\r
++++ b/test/json\r
+@@ -12,6 +12,7 @@ add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00\r
+ output=$(notmuch search --format=json "json-search-message" | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "[{\"thread\": \"XXX\",\r
+ \"timestamp\": 946728000,\r
++\"date_relative\": \"2000-01-01\",\r
+ \"matched\": 1,\r
+ \"total\": 1,\r
+ \"authors\": \"Notmuch Test Suite\",\r
+@@ -28,6 +29,7 @@ add_message "[subject]=\"json-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Ja\r
+ output=$(notmuch search --format=json "jsön-search-méssage" | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "[{\"thread\": \"XXX\",\r
+ \"timestamp\": 946728000,\r
++\"date_relative\": \"2000-01-01\",\r
+ \"matched\": 1,\r
+ \"total\": 1,\r
+ \"authors\": \"Notmuch Test Suite\",\r
+-- \r
+1.7.4.1\r
+\r