[PATCH v3 7/9] test: add tests for date:since..until range queries
authorJani Nikula <jani@nikula.org>
Wed, 12 Sep 2012 21:27:24 +0000 (00:27 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:29 +0000 (09:49 -0800)
5e/bd72c2aa4e05667c2abfaa5c0545898ff7d09d [new file with mode: 0644]

diff --git a/5e/bd72c2aa4e05667c2abfaa5c0545898ff7d09d b/5e/bd72c2aa4e05667c2abfaa5c0545898ff7d09d
new file mode 100644 (file)
index 0000000..cab5f4e
--- /dev/null
@@ -0,0 +1,122 @@
+Return-Path: <jani@nikula.org>\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 E31AF431FC2\r
+       for <notmuch@notmuchmail.org>; Wed, 12 Sep 2012 14:27:58 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 r+ZzbmKn26pO for <notmuch@notmuchmail.org>;\r
+       Wed, 12 Sep 2012 14:27:58 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id EEF9F431FC4\r
+       for <notmuch@notmuchmail.org>; Wed, 12 Sep 2012 14:27:55 -0700 (PDT)\r
+Received: by mail-lb0-f181.google.com with SMTP id gk1so1587473lbb.26\r
+       for <notmuch@notmuchmail.org>; Wed, 12 Sep 2012 14:27:55 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :in-reply-to:references:mime-version:content-type\r
+       :content-transfer-encoding:x-gm-message-state;\r
+       bh=uZbnAmbfi92UlVKd4pkZIBgrd/Ggv7frc7d058UdBpY=;\r
+       b=XhiW/LTEur9MproNEuasmXJ/yrRjLICofo2oo7JXLnFXHBfTYm+Z+ta2BgFyMUKemQ\r
+       rne2qfvSkWbeZgFuUazAjXRhxSaAC3sg5/OJhlaD423aD9hm7uTNHy1u555HZ7wded5w\r
+       v7zfIP2kkWcPsJH9uupc2k/O5MwAtpzb8PKQ5kHyX6zCiO1BE3UO1Cz9iL/FPPtMKwhk\r
+       wqwjbdZF2PTr7gG26HwhbnQdmYIElEycnJZwRaYfvNZAJqj7rI0tH0oB8z7b0ZffbZhH\r
+       6/041obM2+Pq/jaBNLdD0NlakGKegZHK5OB/KWj5SHg/kvO+paig6m8IYHLdEvdFsVi8\r
+       R7mw==\r
+Received: by 10.152.110.40 with SMTP id hx8mr20526350lab.9.1347485275557;\r
+       Wed, 12 Sep 2012 14:27:55 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id p7sm5343634lbg.17.2012.09.12.14.27.53\r
+       (version=SSLv3 cipher=OTHER); Wed, 12 Sep 2012 14:27:54 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org,\r
+       David Bremner <david@tethera.net>\r
+Subject: [PATCH v3 7/9] test: add tests for date:since..until range queries\r
+Date: Thu, 13 Sep 2012 00:27:24 +0300\r
+Message-Id:\r
+ <26006205c9ba7badae63580a341ab09b959ceb1b.1347484177.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.9.5\r
+In-Reply-To: <cover.1347484177.git.jani@nikula.org>\r
+References: <cover.1347484177.git.jani@nikula.org>\r
+In-Reply-To: <cover.1347484177.git.jani@nikula.org>\r
+References: <cover.1347484177.git.jani@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-Gm-Message-State:\r
+ ALoCoQlYjLmbNWS5/23hhAVgpCpTiZ5IwBGDrDJcTlfLET6OeJabsA/+nU7ZwGzX/O6C/WjY8kCR\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: Wed, 12 Sep 2012 21:27:59 -0000\r
+\r
+A brief initial test set.\r
+---\r
+ test/notmuch-test |    1 +\r
+ test/search-date  |   21 +++++++++++++++++++++\r
+ 2 files changed, 22 insertions(+)\r
+ create mode 100755 test/search-date\r
+\r
+diff --git a/test/notmuch-test b/test/notmuch-test\r
+index 7eadfdf..9a1b375 100755\r
+--- a/test/notmuch-test\r
++++ b/test/notmuch-test\r
+@@ -61,6 +61,7 @@ TESTS="\r
+   emacs-show\r
+   missing-headers\r
+   parse-time-string\r
++  search-date\r
+ "\r
+ TESTS=${NOTMUCH_TESTS:=$TESTS}\r
+ \r
+diff --git a/test/search-date b/test/search-date\r
+new file mode 100755\r
+index 0000000..70bcf34\r
+--- /dev/null\r
++++ b/test/search-date\r
+@@ -0,0 +1,21 @@\r
++#!/usr/bin/env bash\r
++test_description="date:since..until queries"\r
++. ./test-lib.sh\r
++\r
++add_email_corpus\r
++\r
++test_begin_subtest "Absolute date range"\r
++output=$(notmuch search date:2010-12-16..12/16/2010 | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX   2010-12-16 [1/1] Olivier Berger; Essai accentuĂ© (inbox unread)"\r
++\r
++test_begin_subtest "Absolute time range with TZ"\r
++notmuch search date:18-Nov-2009_02:19:26-0800..2009-11-18_04:49:52-06:00 | notmuch_search_sanitize > OUTPUT\r
++cat <<EOF >EXPECTED\r
++thread:XXX   2009-11-18 [1/3] Carl Worth| Jan Janak; [notmuch] What a great idea! (inbox unread)\r
++thread:XXX   2009-11-18 [1/2] Carl Worth| Jan Janak; [notmuch] [PATCH] Older versions of install do not support -C. (inbox unread)\r
++thread:XXX   2009-11-18 [1/3] Carl Worth| Aron Griffis, Keith Packard; [notmuch] archive (inbox unread)\r
++thread:XXX   2009-11-18 [1/2] Carl Worth| Keith Packard; [notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox unread)\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
++test_done\r
+-- \r
+1.7.9.5\r
+\r