From 71220c97d40add03f3a2dd1835a65cd0361cfa67 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 19 Mar 2012 15:30:59 +0000 Subject: [PATCH] [PATCH 0/2] test: tests for notmuch-show.c --- a4/ee3a48b4ccbfc6a2d5f856c96517f1b7855399 | 108 ++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 a4/ee3a48b4ccbfc6a2d5f856c96517f1b7855399 diff --git a/a4/ee3a48b4ccbfc6a2d5f856c96517f1b7855399 b/a4/ee3a48b4ccbfc6a2d5f856c96517f1b7855399 new file mode 100644 index 000000000..40dd240d2 --- /dev/null +++ b/a4/ee3a48b4ccbfc6a2d5f856c96517f1b7855399 @@ -0,0 +1,108 @@ +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 CD728431FD0 + for ; Mon, 19 Mar 2012 08:31:06 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + 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 ALjrzlKLnlAz for ; + Mon, 19 Mar 2012 08:31:06 -0700 (PDT) +Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com + [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2B850431FB6 + for ; Mon, 19 Mar 2012 08:31:06 -0700 (PDT) +Received: by wibhq7 with SMTP id hq7so3205133wib.2 + for ; Mon, 19 Mar 2012 08:31:03 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer; + bh=zmNFcYjOx/Sxhy/yEf+DDAHluBtAgYJjI11RwjZl+90=; + b=Lz/Hrz2RmoPSXF2/s85Z9w+hqDoAoOagMx9SEf/q519TOodcz5ajQGaHh/NLvneuAA + MXJ7SZrixe5tP4UM8McOOAjjgeN/Dg+WZE4YOeHLnrMmbmh5mhXKV0aH6iwUpMxbDAkJ + E34ripDDIW6jqVu9L7RjTtO7tmgZCVxUd3afTNHLdWneb63KydygtIm0RYNilqoaafWn + UvCZPgGRajC0NpQ3iy0nbJoi4QMD0p6rJexP/OL1zvX84MpTmcIWDGuee7l7u/j9ZEVD + VsXMRj/ftSCddf601iB7/hpvXkDvq29fMN41TkqMo508UPzCSg1VFCj1wdgn4cTTP1n8 + 2fZQ== +Received: by 10.180.83.72 with SMTP id o8mr20846925wiy.5.1332171063605; + Mon, 19 Mar 2012 08:31:03 -0700 (PDT) +Received: from localhost (94-192-233-223.zone6.bethere.co.uk. + [94.192.233.223]) by mx.google.com with ESMTPS id + n15sm26338795wiw.6.2012.03.19.08.31.01 (version=TLSv1/SSLv3 cipher=OTHER); + Mon, 19 Mar 2012 08:31:02 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/2] test: tests for notmuch-show.c +Date: Mon, 19 Mar 2012 15:30:59 +0000 +Message-Id: <1332171061-27983-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +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: Mon, 19 Mar 2012 15:31:07 -0000 + +As far as I can see there aren't any tests for notmuch-show.c when +outputting multiple messages and in particular for the --entire-thread +option. This adds test for output=text|json|mbox with and without +--entire-thread for queries involving just a thread-id or a thread-id +together with some additional query. + +The current tests do not test the ouptut of multiple threads from one +query, or anything involving exclude tags. + +The output is rather verbose so I have put these in files in a +sub-directory. The first patch adds these test-output-files (and is +obviously generated), the second much smaller patch adds the actual +test. + +Best wishes + +Mark + +Mark Walters (2): + test: show expected output files + test: show tests + + test/notmuch-test | 1 + + test/show | 47 ++ + .../single-thread-and-query-entire-thread-json | 164 +++++++ + .../single-thread-and-query-entire-thread-mbox | 459 ++++++++++++++++++++ + .../single-thread-and-query-entire-thread-text | 278 ++++++++++++ + .../single-thread-and-query-json | 164 +++++++ + .../single-thread-and-query-mbox | 39 ++ + .../single-thread-and-query-text | 42 ++ + test/show.expected-output/single-thread-json | 164 +++++++ + test/show.expected-output/single-thread-mbox | 459 ++++++++++++++++++++ + test/show.expected-output/single-thread-text | 278 ++++++++++++ + 11 files changed, 2095 insertions(+), 0 deletions(-) + create mode 100755 test/show + create mode 100644 test/show.expected-output/single-thread-and-query-entire-thread-json + create mode 100644 test/show.expected-output/single-thread-and-query-entire-thread-mbox + create mode 100644 test/show.expected-output/single-thread-and-query-entire-thread-text + create mode 100644 test/show.expected-output/single-thread-and-query-json + create mode 100644 test/show.expected-output/single-thread-and-query-mbox + create mode 100644 test/show.expected-output/single-thread-and-query-text + create mode 100644 test/show.expected-output/single-thread-json + create mode 100644 test/show.expected-output/single-thread-mbox + create mode 100644 test/show.expected-output/single-thread-text + +-- +1.7.9.1 + -- 2.26.2