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 55533429E26 for ; Tue, 13 Dec 2011 12:59:14 -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 9IbJxVj5mvJm for ; Tue, 13 Dec 2011 12:59:13 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 90D66429E25 for ; Tue, 13 Dec 2011 12:59:13 -0800 (PST) Received: by wgbds13 with SMTP id ds13so141126wgb.2 for ; Tue, 13 Dec 2011 12:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=iczhBpMWQqAqvrOFQtzsLcAxJEluyLirFekA9KOp8KI=; b=LjDXSSsloBdPo41gya4SzbtpwS3OnIYA+wjf1KBda2zImggI5ZpdgWT1q4BXo4Lfk/ sMQ4/fgzZk6wair7B0m8bq/cacvbtu1sk9+XsqucrBtdASNbVGUKtGq75gBFo7Tt7YB8 A6s/FxbAT5SW1fSwEOkHn82KBoEXQwHwAE00o= Received: by 10.227.206.78 with SMTP id ft14mr47285wbb.24.1323809952436; Tue, 13 Dec 2011 12:59:12 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id en20sm402999wid.10.2011.12.13.12.59.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Dec 2011 12:59:11 -0800 (PST) From: Dmitry Kurochkin To: Tomi Ollila , David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] test: optionally print subtest number In-Reply-To: References: <1323806207-31888-1-git-send-email-david@tethera.net> <87ty54ut1s.fsf@gmail.com> User-Agent: Notmuch/0.10.2+96~g74e5ae5 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Wed, 14 Dec 2011 00:58:35 +0400 Message-ID: <87pqfsur2c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Bremner 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: Tue, 13 Dec 2011 20:59:14 -0000 On Tue, 13 Dec 2011 22:55:18 +0200, Tomi Ollila wrote: > On Wed, 14 Dec 2011 00:15:43 +0400, Dmitry Kurochkin wrote: > > On Tue, 13 Dec 2011 15:56:47 -0400, David Bremner wrote: > > > From: David Bremner > > > > > > The idea is that $test_count could be used in tests to label > > > intermediate files. The output enabled by this patch (and --debug) > > > helps figure out which OUTPUT.nn file belongs to which test in case > > > several subtests write to OUTPUT.$test_count > > > --- > > > > > > Is there something that depends on the test format? I find it pretty > > > handy to have the subtest numbers, but I don't want to break some > > > other tools. I followed the existing style of conditionally defining > > > functions, but maybe someone with more bash-fu can improve that. > > > > > > > Looks good to me. Except for tabs taking too much space. Perhaps the > > following would be better? > > > > printf "%-4s" "[$(($test_count - 1))]" > > I attempted the same size reduction. Therefore I know that > this should to be either > > printf " %-4s" "[$(($test_count - 1))]" > or > printf "\t%-4s" "[$(($test_count - 1))]" > > (or something similar) so that there is space betweem BROKEN and [num] > Oh, apparently, not enough testing on my side. I vote for the first version with a space. Regards, Dmitry > This takes 4 bytes out from width (and drops tab as field separator) > (and only few lines goes over 80 char width (some goes even with this > reduction). So ... > > > > Regards, > > Dmitry > > Tomi >