IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 11, 2006, 4:08:51 PM (20 years ago)
Author:
jhoblitt
Message:

add support for empty METADATAs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/t/03_metadata.t

    r3841 r9495  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: 03_metadata.t,v 1.3 2005-05-04 22:05:24 jhoblitt Exp $
     5# $Id: 03_metadata.t,v 1.4 2006-10-12 02:08:51 jhoblitt Exp $
    66
    77use strict;
     
    1212#$::RD_TRACE = 1;
    1313
    14 use Test::More tests => 7;
     14use Test::More tests => 9;
    1515use PS::IPP::Metadata::Config;
    1616
     
    177177    ok( defined( $config ), "two metadata at the same depth");
    178178}
     179
     180{
     181my $example = q{
     182foo METADATA
     183END
     184};
     185    my $config = PS::IPP::Metadata::Config->new->parse( $example );
     186
     187    ok( defined( $config ), "empty METADATA");
     188
     189    my $tree = [
     190        {
     191            name    => 'foo',
     192            class   => 'metadata',
     193            value   => [],
     194        },
     195    ];
     196
     197    is_deeply( $config, $tree, "empty METADATA structure");
     198}
Note: See TracChangeset for help on using the changeset viewer.