IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14032


Ignore:
Timestamp:
Jul 5, 2007, 4:27:32 PM (19 years ago)
Author:
jhoblitt
Message:

fix 'string' parsing

Location:
trunk/PS-IPP-Metadata-Config
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/config_grammar.txt

    r10190 r14032  
    11# Copyright (c) 2005  Joshua Hoblitt
    22#
    3 # $Id: config_grammar.txt,v 1.12 2006-11-25 02:29:05 jhoblitt Exp $
     3# $Id: config_grammar.txt,v 1.13 2007-07-06 02:27:32 jhoblitt Exp $
    44
    55{
     
    302302
    303303string:
    304     /(?:\S[^#\n]*)?[^#\n ]/
     304    /[^#\n\s]+[^#\n]*/
    305305        # trim tailing the trailing white that's left when the string is
    306306        # followed by a comment (#)
  • trunk/PS-IPP-Metadata-Config/t/08_strings.t

    r9849 r14032  
    33# Copyright (C) 2006  Joshua Hoblitt
    44#
    5 # $Id: 08_strings.t,v 1.2 2006-11-04 01:25:32 jhoblitt Exp $
     5# $Id: 08_strings.t,v 1.3 2007-07-06 02:27:32 jhoblitt Exp $
    66
    77use strict;
     
    1212#$::RD_TRACE = 1;
    1313
    14 use Test::More tests => 4;
     14use Test::More tests => 6;
    1515use PS::IPP::Metadata::Config;
    1616
     
    7474    is_deeply( $config, $tree, "NULL str structure" );
    7575}
     76
     77{
     78my $example =<<END;
     79mystr   STR     # some comment
     80END
     81
     82    my $config = $config_parser->parse( $example );
     83    ok(!defined( $config ), "STR without value");
     84
     85    is_deeply( $config, undef, "NULL str structure" );
     86}
Note: See TracChangeset for help on using the changeset viewer.