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 E31AF431FC2 for ; Wed, 12 Sep 2012 14:27:58 -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 r+ZzbmKn26pO for ; Wed, 12 Sep 2012 14:27: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 EEF9F431FC4 for ; Wed, 12 Sep 2012 14:27:55 -0700 (PDT) Received: by mail-lb0-f181.google.com with SMTP id gk1so1587473lbb.26 for ; Wed, 12 Sep 2012 14:27:55 -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=uZbnAmbfi92UlVKd4pkZIBgrd/Ggv7frc7d058UdBpY=; b=XhiW/LTEur9MproNEuasmXJ/yrRjLICofo2oo7JXLnFXHBfTYm+Z+ta2BgFyMUKemQ rne2qfvSkWbeZgFuUazAjXRhxSaAC3sg5/OJhlaD423aD9hm7uTNHy1u555HZ7wded5w v7zfIP2kkWcPsJH9uupc2k/O5MwAtpzb8PKQ5kHyX6zCiO1BE3UO1Cz9iL/FPPtMKwhk wqwjbdZF2PTr7gG26HwhbnQdmYIElEycnJZwRaYfvNZAJqj7rI0tH0oB8z7b0ZffbZhH 6/041obM2+Pq/jaBNLdD0NlakGKegZHK5OB/KWj5SHg/kvO+paig6m8IYHLdEvdFsVi8 R7mw== Received: by 10.152.110.40 with SMTP id hx8mr20526350lab.9.1347485275557; Wed, 12 Sep 2012 14:27:55 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id p7sm5343634lbg.17.2012.09.12.14.27.53 (version=SSLv3 cipher=OTHER); Wed, 12 Sep 2012 14:27:54 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org, David Bremner Subject: [PATCH v3 7/9] test: add tests for date:since..until range queries Date: Thu, 13 Sep 2012 00:27:24 +0300 Message-Id: <26006205c9ba7badae63580a341ab09b959ceb1b.1347484177.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: ALoCoQlYjLmbNWS5/23hhAVgpCpTiZ5IwBGDrDJcTlfLET6OeJabsA/+nU7ZwGzX/O6C/WjY8kCR 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: Wed, 12 Sep 2012 21:27: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.9.5