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 16E42431FBD for ; Sun, 9 Dec 2012 06:56:15 -0800 (PST) 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 J9QjlPL1nMe7 for ; Sun, 9 Dec 2012 06:56:14 -0800 (PST) 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 0737A431FC3 for ; Sun, 9 Dec 2012 06:56:11 -0800 (PST) Received: by mail-la0-f53.google.com with SMTP id w12so1484159lag.26 for ; Sun, 09 Dec 2012 06:56:11 -0800 (PST) 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=VBkhXqCGI8YEcLi8buN7MDqJCKJacnxs8Raj5f7rWFw=; b=KUlS5Gx0v6cWRBe8LLjMnY/Yj9+DCbDcniyzSpQXkjVxetJxH3XrteiFeMJwrbUo3r fF++FO/7kljWYZckHjr+lGF74Bmga6BYE0ReHNFKTKwQyCVGWsQrMexxhIvKCf6ZLPhO NFVCsS9Ht90xsD0vvsfAEAeCwImTOrQbTnzVVHtuQLjHucEuzcTGAjAI2F/xjMZmHhYe HMB4214UJOhsV7NrPMF9nbGvXqbZYeEleQxmuCuSuymmLxFKgqG0AX0KnT6rkix0K6Vx OTC99cfVbXXq9wrZHvQUDH1ctF+8U7GutlDzO6o87RG+W9p7UHNqEg9fkVZVJSJFEVjo pPRg== Received: by 10.112.17.170 with SMTP id p10mr4945793lbd.53.1355064971591; Sun, 09 Dec 2012 06:56:11 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id ml1sm3598259lab.15.2012.12.09.06.56.10 (version=SSLv3 cipher=OTHER); Sun, 09 Dec 2012 06:56:10 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v2 3/4] test: notmuch search --format=text0 Date: Sun, 9 Dec 2012 16:55:58 +0200 Message-Id: <5c881edb2803e613e8726f71fe86772d372b38a0.1355064714.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: ALoCoQmEx1rdqUwz4GrJFzl4dz6awoII5D3njhxxgDbiN8nhl7vHo8VTbhRX1yFK54pOYedJBH+S 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: Sun, 09 Dec 2012 14:56:15 -0000 --- test/text | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/text b/test/text index 428c89b..e003a66 100755 --- a/test/text +++ b/test/text @@ -52,4 +52,33 @@ output=$(notmuch search --format=text "tëxt-search-méssage" | notmuch_search_s test_expect_equal "$output" \ "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; text-search-utf8-body-sübjéct (inbox unread)" +add_email_corpus + +test_begin_subtest "Search message tags: text0" +cat < EXPECTED.$test_count +attachment inbox signed unread +EOF +notmuch search --format=text0 --output=tags '*' | xargs -0 | notmuch_search_sanitize > OUTPUT.$test_count +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + +test_begin_subtest "Compare text vs. text0 for threads" +notmuch search --format=text --output=threads '*' | notmuch_search_sanitize > EXPECTED.$test_count +notmuch search --format=text0 --output=threads '*' | xargs -0 -L1 | notmuch_search_sanitize > OUTPUT.$test_count +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + +test_begin_subtest "Compare text vs. text0 for messages" +notmuch search --format=text --output=messages '*' | notmuch_search_sanitize > EXPECTED.$test_count +notmuch search --format=text0 --output=messages '*' | xargs -0 -L1 | notmuch_search_sanitize > OUTPUT.$test_count +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + +test_begin_subtest "Compare text vs. text0 for files" +notmuch search --format=text --output=files '*' | notmuch_search_sanitize > EXPECTED.$test_count +notmuch search --format=text0 --output=files '*' | xargs -0 -L1 | notmuch_search_sanitize > OUTPUT.$test_count +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + +test_begin_subtest "Compare text vs. text0 for tags" +notmuch search --format=text --output=tags '*' | notmuch_search_sanitize > EXPECTED.$test_count +notmuch search --format=text0 --output=tags '*' | xargs -0 -L1 | notmuch_search_sanitize > OUTPUT.$test_count +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count + test_done -- 1.7.10.4