Changeset 7865
- Timestamp:
- Jul 11, 2006, 4:49:53 PM (20 years ago)
- Location:
- trunk/PS-IPP-Metadata-Config
- Files:
-
- 2 edited
-
lib/PS/IPP/Metadata/Config.pm (modified) (2 diffs)
-
t/02_examples.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Metadata-Config/lib/PS/IPP/Metadata/Config.pm
r7830 r7865 1 1 # Copyright (c) 2005 Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1.1 7 2006-07-06 21:49:27jhoblitt Exp $3 # $Id: Config.pm,v 1.18 2006-07-12 02:49:53 jhoblitt Exp $ 4 4 5 5 package PS::IPP::Metadata::Config; … … 36 36 sub parse { 37 37 my ( $self, $metadata ) = @_; 38 39 return undef if not defined $metadata; 40 return undef if $metadata =~ /^\s*$/; 38 41 39 42 # remove any local data from a prevous run -
trunk/PS-IPP-Metadata-Config/t/02_examples.t
r3842 r7865 3 3 # Copyright (C) 2005 Joshua Hoblitt 4 4 # 5 # $Id: 02_examples.t,v 1. 4 2005-05-04 22:08:08jhoblitt Exp $5 # $Id: 02_examples.t,v 1.5 2006-07-12 02:49:53 jhoblitt Exp $ 6 6 7 7 use strict; … … 12 12 #$::RD_TRACE = 1; 13 13 14 use Test::More tests => 6;14 use Test::More tests => 9; 15 15 use PS::IPP::Metadata::Config; 16 16 17 17 my $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 } 18 33 19 34 {
Note:
See TracChangeset
for help on using the changeset viewer.
