IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 11, 2006, 4:49:53 PM (20 years ago)
Author:
jhoblitt
Message:

change ->parse() to gracefully handle undef and empty strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/t/02_examples.t

    r3842 r7865  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: 02_examples.t,v 1.4 2005-05-04 22:08:08 jhoblitt Exp $
     5# $Id: 02_examples.t,v 1.5 2006-07-12 02:49:53 jhoblitt Exp $
    66
    77use strict;
     
    1212#$::RD_TRACE = 1;
    1313
    14 use Test::More tests => 6;
     14use Test::More tests => 9;
    1515use PS::IPP::Metadata::Config;
    1616
    1717my $config_parser = PS::IPP::Metadata::Config->new;
     18
     19{
     20    my $config = $config_parser->parse(undef);
     21    is($config, undef, "parsing undef returns undef");
     22}
     23
     24{
     25    my $config = $config_parser->parse('');
     26    is($config, undef, "parsing an empty string returns undef");
     27}
     28
     29{
     30    my $config = $config_parser->parse("\n\n\n\n\n");
     31    is($config, undef, "parsing an empty string returns undef");
     32}
    1833
    1934{
Note: See TracChangeset for help on using the changeset viewer.