IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 3, 2006, 3:25:32 PM (20 years ago)
Author:
jhoblitt
Message:

fix handling of NULL strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/t/08_strings.t

    r9161 r9849  
    33# Copyright (C) 2006  Joshua Hoblitt
    44#
    5 # $Id: 08_strings.t,v 1.1 2006-10-04 01:24:03 jhoblitt Exp $
     5# $Id: 08_strings.t,v 1.2 2006-11-04 01:25:32 jhoblitt Exp $
    66
    77use strict;
     
    1212#$::RD_TRACE = 1;
    1313
    14 use Test::More tests => 2;
     14use Test::More tests => 4;
    1515use PS::IPP::Metadata::Config;
    1616
     
    4545    is_deeply( $config, $tree, "str structure" );
    4646}
     47
     48{
     49my $example =<<END;
     50mystr   MULTI
     51mystr   STR     NULL
     52mystr   STR     NULL    # some comment
     53END
     54
     55    my $config = $config_parser->parse( $example );
     56    ok( defined( $config ), "NULL strs parsed");
     57
     58    my $tree = [
     59        {
     60            name    => 'mystr',
     61            class   => 'scalar',
     62            type    => 'STR',
     63            value   => undef,
     64        },
     65        {
     66            name    => 'mystr',
     67            class   => 'scalar',
     68            type    => 'STR',
     69            value   => undef,
     70            comment => 'some comment',
     71        },
     72    ];
     73
     74    is_deeply( $config, $tree, "NULL str structure" );
     75}
Note: See TracChangeset for help on using the changeset viewer.