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 23368431E64 for ; Wed, 1 Feb 2012 01:24:35 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.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 fbDMnvyht7IF for ; Wed, 1 Feb 2012 01:24:34 -0800 (PST) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 61FE1431FAF for ; Wed, 1 Feb 2012 01:24:34 -0800 (PST) Received: by bke11 with SMTP id 11so904577bke.26 for ; Wed, 01 Feb 2012 01:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=NQZ8wf6habitkxauYKQb4H/MG/3o418apUz6rqtRj6Q=; b=b5Ilvd23cFwKsvyEqlBMJ2wGr2U6ADyoAQyYLruElMos6i90ag4moaeA3SG+ub/wRP IJjmPgmE+zl36jXQEINMkwfIUL0+IiL1hhBNz4mf785FbAS7flynEKCAKJX7ZodPHF5r a9kOaTSVBthGCPygMDzBG9fpgzhGx8dU0f+kg= Received: by 10.204.143.131 with SMTP id v3mr12630437bku.83.1328088272966; Wed, 01 Feb 2012 01:24:32 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id bw9sm52575167bkb.8.2012.02.01.01.24.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Feb 2012 01:24:32 -0800 (PST) From: Dmitry Kurochkin To: Tomi Ollila , Jameson Graef Rollins , notmuch@notmuchmail.org Subject: Re: [PATCH] test: make test_expect_equal_file() arguments flexible In-Reply-To: References: <1328080794-24670-1-git-send-email-dmitry.kurochkin@gmail.com> <87r4yfszx9.fsf@servo.finestructure.net> User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Wed, 01 Feb 2012 13:23:19 +0400 Message-ID: <87mx92nbzs.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Wed, 01 Feb 2012 09:24:35 -0000 On Wed, 01 Feb 2012 10:55:50 +0200, Tomi Ollila wrote: > On Wed, 01 Feb 2012 00:47:30 -0800, Jameson Graef Rollins wrote: > > On Wed, 1 Feb 2012 11:19:54 +0400, Dmitry Kurochkin wrote: > > > The down side of this approach is that diff argument order depends on > > > test_expect_equal_file() argument order. So sometimes we get diff > > > from expected to actual results, and sometimes the other way around. > > > But the files are always named correctly. > > > > Actually, I think this last point is the most important thing to retain. > > Consistency in the diffs makes reading test results much more efficient. > > The order I don't much care about. But seeing as we have been > > consistent with a particular order for a while, it seems like more > > effort than it's worth to change it. > > how about enforcing it in the test suite ? > > case $file2 in > *.expected|*.EXPECTED) ;; > *) echo "$file2" does not end with 'expected' >&2; exit 1 > esac > It would break some existing tests. But I like it. Regards, Dmitry > > > > jamie. > > Tomi