From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 65D8A431FAF for ; Tue, 30 Oct 2012 13:33:22 -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 5ZxNUp0zoblx for ; Tue, 30 Oct 2012 13:33:21 -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 7696D429E30 for ; Tue, 30 Oct 2012 13:33:08 -0700 (PDT) Received: by mail-lb0-f181.google.com with SMTP id gg6so567600lbb.26 for ; Tue, 30 Oct 2012 13:33:07 -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=LqEcfUc+Dl0f2eoRA/O03Gi4ntyBevq6A1xvvYf6Uognj1w2RCRzEQuOSAWZ4XrWy9 zygTaRN6qhMTrI/7U6pC3xsiuLjPxo2M5ZSmsjaWoGHKzBDnJyZ2HBRyiTKo/CapjCu+ WHtW9uV+oi6hXWb9UeeQaJSJFX0SLymbLdbhpb4duZPTUb5SE2RK8rsCUEATLh5ZjvkY Fi5IBEw9OK/eraGoGAqou5AgiYmKgmJVKJSFLniuVY5BwpEufbKvaIPXGeTK1osZyRwJ MXZ+n+gUFp0XaN5Coa718ceCIu+KLkgbZ6xiWQn+ev7xq4hOt58oPS4aU1Bcue0bDbes hnkQ== Received: by 10.152.104.77 with SMTP id gc13mr31226022lab.16.1351629187882; Tue, 30 Oct 2012 13:33:07 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id pz9sm662461lab.11.2012.10.30.13.33.06 (version=SSLv3 cipher=OTHER); Tue, 30 Oct 2012 13:33:07 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v6 7/9] test: add tests for date:since..until range queries Date: Tue, 30 Oct 2012 22:32:38 +0200 Message-Id: <6d48bc38adb27e7a6da8f4094be417220a2bf9c7.1351626272.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: ALoCoQnD9LCRMughWQEs2asubJO9jgNVAr1h3Mr+fMAPG0aGSZLtMO2RuP/ikqz954Va2F0sWKW8 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: Tue, 30 Oct 2012 20:33:22 -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