[tap] Octothorpe/hash "#" in descriptions?

Salve J Nilsen <sjn@pvv.org> Tue, 02 March 2010 16:54 UTC

Return-Path: <sjn@pvv.ntnu.no>
X-Original-To: tap@core3.amsl.com
Delivered-To: tap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id E7E7928C1D6 for <tap@core3.amsl.com>; Tue, 2 Mar 2010 08:54:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 708+ir5u73dM for <tap@core3.amsl.com>; Tue, 2 Mar 2010 08:54:39 -0800 (PST)
Received: from decibel.pvv.ntnu.no (decibel.pvv.ntnu.no [IPv6:2001:700:300:1900::1:2]) by core3.amsl.com (Postfix) with ESMTP id 6F4AF28C1D7 for <tap@ietf.org>; Tue, 2 Mar 2010 08:54:39 -0800 (PST)
Received: from sjn by decibel.pvv.ntnu.no with local (Exim 4.69) (envelope-from <sjn@pvv.ntnu.no>) id 1NmVMg-0005jc-CW; Tue, 02 Mar 2010 17:54:34 +0100
Date: Tue, 02 Mar 2010 17:54:34 +0100
From: Salve J Nilsen <sjn@pvv.org>
X-X-Sender: sjn@decibel.pvv.ntnu.no
To: Ovid <publiustemp-tapx@yahoo.com>
In-Reply-To: <727583.94791.qm@web65714.mail.ac4.yahoo.com>
Message-ID: <alpine.DEB.1.00.1003021718090.2167@decibel.pvv.ntnu.no>
References: <727583.94791.qm@web65714.mail.ac4.yahoo.com>
User-Agent: Alpine 1.00 (DEB 882 2007-12-20)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format="flowed"; charset="US-ASCII"
Cc: TAP <tap@ietf.org>
Subject: [tap] Octothorpe/hash "#" in descriptions?
X-BeenThere: tap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Test Anything Protocol WG discussions <tap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tap>, <mailto:tap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tap>
List-Post: <mailto:tap@ietf.org>
List-Help: <mailto:tap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tap>, <mailto:tap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Mar 2010 16:54:41 -0000

This is Re: the current version of the draft, 
<http://github.com/gaurav/test-anything-protocol/blob/master/draft-vaidya-test-anything-protocol-00.xml>

Ovid said:
>
> Why are '#' characters not allowed in descriptions?
>
>  my $builder = Test::Builder->new;
>  $builder->todo_start('hash mark filtering not implemented')
>  unlike $result, qr/#/, 'Result does not contain #';
>  $builder->todo_end;
>
> Sometimes that's something may want in a description and it reads 
> naturally.  I'd like to see the hash mark (octothorpe, whatever), 
> escaped:
>
>  ok 3 - Result does not contain \# # TODO hash mark filtering unimplemented

FWIW, I think escaping is completely reasonable. It's already 
implemented like this in Test::Builder and Test::Harness, and could at 
least be considered "established practice" in the Perl community. (Not 
sure since when though.)

We have four options, I think.

1) Keep disallowing # in the description (breaking with established
    practice, but perhaps gain a small simplification in the draft
    text.)

2) Allow escaped # in the description, using the \# syntax already
    established in the Perl community's most used testing modules.

3) Allow escaped # in the description, using some other syntax,
    e.g. the printf(3)-like "##" way with double-characters ("%%" to
    represent a literal "%".) This breaks with both established
    practice and doesn't seem to give an obvious benefit otherwise.


I'm for 2).


- Salve

-- 
#!/usr/bin/perl
sub AUTOLOAD{$AUTOLOAD=~/.*::(\d+)/;seek(DATA,$1,0);print#  Salve Joshua Nilsen
getc DATA}$"="'};&{'";@_=unpack("C*",unpack("u*",':4@,$'.#     <sjn@foo.no>
'2!--"5-(50P%$PL,!0X354UC-PP%/0\`'."\n"));eval "&{'@_'}";   __END__ is near! :)