From: Jani Nikula Date: Sat, 4 Aug 2012 07:41:44 +0000 (+0300) Subject: [PATCH v2 6/7] test: add tests for date:since..until range queries X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=9b72624c1059359afc2b79f7a5299d752538b779;p=notmuch-archives.git [PATCH v2 6/7] test: add tests for date:since..until range queries --- diff --git a/5b/cc8070f5cf8c9d66aa5b05d28824cb171ad913 b/5b/cc8070f5cf8c9d66aa5b05d28824cb171ad913 new file mode 100644 index 000000000..f0f935c18 --- /dev/null +++ b/5b/cc8070f5cf8c9d66aa5b05d28824cb171ad913 @@ -0,0 +1,121 @@ +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 A3A5B431FAE + for ; Sat, 4 Aug 2012 00:42:59 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +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 YCWDV4XyHDgF for ; + Sat, 4 Aug 2012 00:42:58 -0700 (PDT) +Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com + [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 7D9FE431FB6 + for ; Sat, 4 Aug 2012 00:42:18 -0700 (PDT) +Received: by mail-lb0-f181.google.com with SMTP id gk1so786230lbb.26 + for ; Sat, 04 Aug 2012 00:42:18 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references + :in-reply-to:references:mime-version:content-type + :content-transfer-encoding:x-gm-message-state; + bh=Zsa0iwN+8TgsumQreiL/Bo9NFW/lNUs0x4r1aBjqQoU=; + b=CQcMx7rjIPwtw+SIihJaXzQfp+7zHyHGbi5x0YKUSOMw6UQcGu0K9KRuhUtFiLKU6D + NH5979RhIEGMjEO2I3s9HowwhHq67e2VF7+smuFDmcXz9J9YMOD2sOnLPiBsBjuUrmlV + 1jHJfVZIBfHI4RTQOTaGfDL2oy+bbD7Q1t+/J2MBh0t95xzpOMe1TJoCZQDVbYSMdxhR + eErQqp7wGVWSqYik1WDmq4/W1mid8oAXGcnZtJ7+/0pbGycXlA9Wfou7EYoD3G8o3al5 + 2ff9np30jW9JLwQszZDUcEwsjqwSPeBh+uA9DEbqYXt64yDxJg6h5WP0LvKcajqCx2uO + VUEg== +Received: by 10.112.45.40 with SMTP id j8mr1695573lbm.52.1344066138062; + Sat, 04 Aug 2012 00:42:18 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id pi16sm10838670lab.7.2012.08.04.00.42.16 + (version=SSLv3 cipher=OTHER); Sat, 04 Aug 2012 00:42:17 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 6/7] test: add tests for date:since..until range queries +Date: Sat, 4 Aug 2012 10:41:44 +0300 +Message-Id: + <240032b31f898eea5592154e82c3634b5a661b86.1344065790.git.jani@nikula.org> +X-Mailer: git-send-email 1.7.9.5 +In-Reply-To: +References: +In-Reply-To: +References: +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +X-Gm-Message-State: + ALoCoQkRzgVSpAdCdahjw8zPllmOoxJpYDwehPrlUe57tAKXdn3PWi29psHEYxiwnJg03dsCJU5x +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: Sat, 04 Aug 2012 07:42:59 -0000 + +A brief initial test set. +--- + test/notmuch-test | 1 + + test/search-date | 21 +++++++++++++++++++++ + 2 files changed, 22 insertions(+) + create mode 100755 test/search-date + +diff --git a/test/notmuch-test b/test/notmuch-test +index 80e687e..1654eb6 100755 +--- a/test/notmuch-test ++++ b/test/notmuch-test +@@ -60,6 +60,7 @@ TESTS=" + emacs-hello + emacs-show + parse-time-string ++ search-date + " + TESTS=${NOTMUCH_TESTS:=$TESTS} + +diff --git a/test/search-date b/test/search-date +new file mode 100755 +index 0000000..70bcf34 +--- /dev/null ++++ b/test/search-date +@@ -0,0 +1,21 @@ ++#!/usr/bin/env bash ++test_description="date:since..until queries" ++. ./test-lib.sh ++ ++add_email_corpus ++ ++test_begin_subtest "Absolute date range" ++output=$(notmuch search date:2010-12-16..12/16/2010 | notmuch_search_sanitize) ++test_expect_equal "$output" "thread:XXX 2010-12-16 [1/1] Olivier Berger; Essai accentué (inbox unread)" ++ ++test_begin_subtest "Absolute time range with TZ" ++notmuch search date:18-Nov-2009_02:19:26-0800..2009-11-18_04:49:52-06:00 | notmuch_search_sanitize > OUTPUT ++cat <EXPECTED ++thread:XXX 2009-11-18 [1/3] Carl Worth| Jan Janak; [notmuch] What a great idea! (inbox unread) ++thread:XXX 2009-11-18 [1/2] Carl Worth| Jan Janak; [notmuch] [PATCH] Older versions of install do not support -C. (inbox unread) ++thread:XXX 2009-11-18 [1/3] Carl Worth| Aron Griffis, Keith Packard; [notmuch] archive (inbox unread) ++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) ++EOF ++test_expect_equal_file OUTPUT EXPECTED ++ ++test_done +-- +1.7.9.5 +