From: Jani Nikula Date: Fri, 3 Aug 2012 21:51:51 +0000 (+0300) Subject: [PATCH 6/7] test: add tests for date:since..until range queries X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e8fd917a2ae2b4be6795df93af3c9e7dfeece4f5;p=notmuch-archives.git [PATCH 6/7] test: add tests for date:since..until range queries --- diff --git a/72/049a06c61e4c1a0376d102c548e43b7cff0445 b/72/049a06c61e4c1a0376d102c548e43b7cff0445 new file mode 100644 index 000000000..ac98e3b14 --- /dev/null +++ b/72/049a06c61e4c1a0376d102c548e43b7cff0445 @@ -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 D88C7431FBC + for ; Fri, 3 Aug 2012 14:52:15 -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 ieN92XuEx7Il for ; + Fri, 3 Aug 2012 14:52:15 -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 B0002431FAF + for ; Fri, 3 Aug 2012 14:52:14 -0700 (PDT) +Received: by mail-lb0-f181.google.com with SMTP id gk1so621084lbb.26 + for ; Fri, 03 Aug 2012 14:52:14 -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=L1dhKlndzBOgqWpMRckhLfIaQg1AXUcD0X1S9TaxdYQ5RfTlV8n69SOBXu21X5aeur + U4GUBbO1TnYaoavUM9ZIrzkIchGCdSsn6rB1lr53DpFo/bjdGaXYqb3C+dZnl2x2WAt4 + jJB3Mu1I6q/F19ncrGkAdRl8s7r1POXpimn3GtTSKMh89rN0O5NXsemE5MxyWe58OtqZ + gywD7DuMjx7PO2gIbjBgtPjAEVb8EiuDrAdbjtitu5Exb0/FQgHny0vuoEI0IBRC2Uu+ + JeMgZWlS6VT6MMhVEsdjB64alj3HpS06oxwNpqaSE2ILpWsf+W0MvHGn9zNdLEXyl/T9 + 8qlg== +Received: by 10.112.49.227 with SMTP id x3mr1226932lbn.73.1344030734294; + Fri, 03 Aug 2012 14:52:14 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id xx8sm9731109lab.10.2012.08.03.14.52.12 + (version=SSLv3 cipher=OTHER); Fri, 03 Aug 2012 14:52:13 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 6/7] test: add tests for date:since..until range queries +Date: Sat, 4 Aug 2012 00:51:51 +0300 +Message-Id: + <372783dbeda6ffb97d6ba2b76b6170e9ca6c5bf9.1344028781.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: + ALoCoQnCohFabWqJOA0Rxy91OSGQGN4U8p5bh+YJGIte6c86Yl/aQBpApsHCVHVab5eyipYJoOQE +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: Fri, 03 Aug 2012 21:52:16 -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 +