From: Jani Nikula Date: Sun, 21 Oct 2012 21:22:30 +0000 (+0300) Subject: [PATCH v5 7/9] test: add tests for date:since..until range queries X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=919560b7f25f0187b7c6c77f5207690a8d2834e9;p=notmuch-archives.git [PATCH v5 7/9] test: add tests for date:since..until range queries --- diff --git a/a2/624093924f857622becb11e32d7a7c9ce1cf83 b/a2/624093924f857622becb11e32d7a7c9ce1cf83 new file mode 100644 index 000000000..890142728 --- /dev/null +++ b/a2/624093924f857622becb11e32d7a7c9ce1cf83 @@ -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 24818431FB6 + for ; Sun, 21 Oct 2012 14:22: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 XHjaVV9CKllB for ; + Sun, 21 Oct 2012 14:22:58 -0700 (PDT) +Received: from mail-la0-f53.google.com (mail-la0-f53.google.com + [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 19D21431FBD + for ; Sun, 21 Oct 2012 14:22:57 -0700 (PDT) +Received: by mail-la0-f53.google.com with SMTP id l5so1455559lah.26 + for ; Sun, 21 Oct 2012 14:22:57 -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=HT2vp26axh3dG68VO95zmxJ7TSz6nDi+6pJshCTXI0I=; + b=kgUCYdY40E6fezPs5wBEr7CGje6L1tycR+luEmCTQtoFFnR86wcvrBgtv9WY05Zt4w + iBTN2yWbKyVENKWbJpgHZuP6gnIr0S6Z6asfpN9m+vLO41zLFBSKVTduY5fukK43XC3C + a1C0ht5Ctxmg99mMFboZus2AMrjdg7OVagEFjN26+Au9h1PuqJLKhOh3FW2PjTvxdFy5 + zpe3RRrNSWMID82bP4mLITnKOPPdrpvjrv/CMUWY4+KuWKWgvqnrnOSEh6LYidArn/BX + AQS5oceQ5e/nsdBKuAoBzYV658cZcpJdg7TCtv52visOZ/f9x1z0IiIRyP6lz1+xBHXA + rjxg== +Received: by 10.152.103.100 with SMTP id fv4mr6375280lab.39.1350854577743; + Sun, 21 Oct 2012 14:22:57 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id g5sm2470467lbk.7.2012.10.21.14.22.56 + (version=SSLv3 cipher=OTHER); Sun, 21 Oct 2012 14:22:57 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v5 7/9] test: add tests for date:since..until range queries +Date: Mon, 22 Oct 2012 00:22:30 +0300 +Message-Id: + <37026480956679b12e82e4975f1837e93ef1c531.1350854171.git.jani@nikula.org> +X-Mailer: git-send-email 1.7.10.4 +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: + ALoCoQnwTuDYn39v89vm2M9foIKSIaZwo9oT6Rsz+IQlAEcqh5EotrFiL1olVDd88zB4mrpDcisS +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, 21 Oct 2012 21:22: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 7eadfdf..9a1b375 100755 +--- a/test/notmuch-test ++++ b/test/notmuch-test +@@ -61,6 +61,7 @@ TESTS=" + emacs-show + missing-headers + 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.10.4 +