From 1666e79dc28796f4076769fee2b6e67b5994874d Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 14 Oct 2012 01:09:53 +0300 Subject: [PATCH] [PATCH v4 7/9] test: add tests for date:since..until range queries --- 55/4618ee9d5217bfa577a4cf912fc744c7b788e6 | 121 ++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 55/4618ee9d5217bfa577a4cf912fc744c7b788e6 diff --git a/55/4618ee9d5217bfa577a4cf912fc744c7b788e6 b/55/4618ee9d5217bfa577a4cf912fc744c7b788e6 new file mode 100644 index 000000000..872284fbf --- /dev/null +++ b/55/4618ee9d5217bfa577a4cf912fc744c7b788e6 @@ -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 2CADB431FBD + for ; Sat, 13 Oct 2012 15:10:24 -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 S1MWq4V6bMxO for ; + Sat, 13 Oct 2012 15:10:23 -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 8980D431FBC + for ; Sat, 13 Oct 2012 15:10:21 -0700 (PDT) +Received: by mail-la0-f53.google.com with SMTP id l5so2917954lah.26 + for ; Sat, 13 Oct 2012 15:10:21 -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=F5ldtCbw95g88+xzi9t9HeVTtiHwTru6DA5vT20A9/+4qwsc0TOj6GmKyf9LZhKOye + mDP0RGuJu9kLUClmlSEhbxGjF+O0KMumyH5akJwjk9cDP/sJNDjnLOdlYb7herwJ5jiV + 9IZn92ZRTfhVB0S05K7G04v1iTByyPlPGritkgQUb+OEdJHeHhjfl/CxOLwGgg1aJczG + /AdUw4etbK4smG1U4Y0gIJ/r9PyrdqNhyGFLXhsdRVnwBK5GeloV7dBUTe2RRvDYLbw/ + hd4Jr5EdXAhBG19pdtfPqzs/DmUy7qsv3vM7DupXcFjztC9u4KxFMjRFHaR5PThxxNUb + YZWA== +Received: by 10.152.48.102 with SMTP id k6mr6669271lan.12.1350166221212; + Sat, 13 Oct 2012 15:10:21 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id gk11sm3221648lab.3.2012.10.13.15.10.19 + (version=SSLv3 cipher=OTHER); Sat, 13 Oct 2012 15:10:20 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v4 7/9] test: add tests for date:since..until range queries +Date: Sun, 14 Oct 2012 01:09:53 +0300 +Message-Id: + <195c9bfc0bc47f05056e05b4e8791a6cc3980713.1350164594.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: + ALoCoQmUdB4raESSRll7ZewaNZoB+iNGuE5hG/ICZjuVTndYPvPb/oyXZXB3/YeVFy7LmLylUbKA +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, 13 Oct 2012 22:10:24 -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 + -- 2.26.2