unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Sebastian Spaeth <Sebastian@SSpaeth.de>
To: notmuch@notmuchmail.org
Subject: [PATCH] notmuch-test: add tests for counting within absolute time ranges and 'today'
Date: Mon,  8 Feb 2010 13:57:19 +0100	[thread overview]
Message-ID: <1265633839-31510-1-git-send-email-Sebastian@SSpaeth.de> (raw)
In-Reply-To: <1265627652-25912-4-git-send-email-Sebastian@SSpaeth.de>

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
---
 test/notmuch-test |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/test/notmuch-test b/test/notmuch-test
index 2e5eb24..adc9f24 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -534,6 +534,19 @@ printf " Restore with nothing to do...\t"
 $NOTMUCH restore dump.expected
 echo "	PASS"
 
+# Test daterange with absolute month---------------------------------------
+printf "\nTesting \"notmuch count\" in several variations:\n"
+printf " absolute date range..."
+#Find all messages from January 2010
+execute_expecting "count date:2010-01..01" "8"
+
+# Test daterange with today keyword-----------------------------------------
+printf " 'today' date range..."
+TODAY=`date -R`
+add_message '[date]="${TODAY}"'
+execute_expecting "count date:today..today" "1"
+# End Test daterange parser-------------------------------------------------
+
 cat <<EOF
 Notmuch test suite complete.
 
-- 
1.6.3.3

      reply	other threads:[~2010-02-08 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08  9:41 date parser branch updated and rebased Sebastian Spaeth
2010-02-08 11:14 ` [PATCH 1/4] add date parser file from Keith Sebastian Spaeth
2010-02-08 11:14   ` [PATCH 2/4] Introduce new notmuch return status NOTMUCH_STATUS_INVALID_DATE Sebastian Spaeth
2010-02-08 11:14     ` [PATCH 3/4] integrate date parser Sebastian Spaeth
2010-02-08 11:14       ` [PATCH 4/4] add documentation for the new daterange parser and remove TODO list item Sebastian Spaeth
2010-02-08 12:57         ` Sebastian Spaeth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265633839-31510-1-git-send-email-Sebastian@SSpaeth.de \
    --to=sebastian@sspaeth.de \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).