Changeset 3496 for trunk/PS-IPP-Metadata-Config/t/06_multi.t
- Timestamp:
- Mar 24, 2005, 12:32:55 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Metadata-Config/t/06_multi.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Metadata-Config/t/06_multi.t
r3494 r3496 3 3 # Copyright (C) 2005 Joshua Hoblitt 4 4 # 5 # $Id: 06_multi.t,v 1. 4 2005-03-24 22:07:25 jhoblitt Exp $5 # $Id: 06_multi.t,v 1.5 2005-03-24 22:32:55 jhoblitt Exp $ 6 6 7 7 use strict; … … 12 12 #$::RD_TRACE = 1; 13 13 14 use Test::More tests => 8;14 use Test::More tests => 13; 15 15 use PS::IPP::Metadata::Config; 16 16 … … 59 59 my $example = q{ 60 60 foo MULTI 61 foo METADATA 62 bar BOOL T 63 END 64 foo METADATA 65 bar BOOL T 66 END 67 }; 68 my $config = $config_parser->parse( $example ); 69 ok( defined( $config ), "MULTI METADATA"); 70 } 71 72 { 73 my $example = q{ 74 foo METADATA 75 bar BOOL T 76 END 77 foo METADATA 78 bar BOOL T 79 END 80 }; 81 my $config = $config_parser->parse( $example ); 82 83 my $tree = [ 84 { 85 name => 'foo', 86 class => 'metadata', 87 value => [{ 88 name => 'bar', 89 class => 'scalar', 90 type => 'BOOL', 91 value => 1, 92 }], 93 }, 94 ]; 95 96 is_deeply( $config, $tree, "MULTI METADATA structure, not declared" ); 97 } 98 99 { 100 my $example = q{ 101 foo MULTI 102 TYPE bar a b c 103 foo bar x y z 104 foo bar x y z 105 }; 106 my $config = $config_parser->parse( $example ); 107 ok( defined( $config ), "MULTI TYPE"); 108 } 109 110 { 111 my $example = q{ 112 TYPE bar a b c 113 foo MULTI 114 foo bar x y z 115 foo bar x y z 116 }; 117 my $config = $config_parser->parse( $example ); 118 119 ok( defined( $config ), "MULTI TYPE"); 120 } 121 122 { 123 my $example = q{ 124 TYPE bar a b c 125 foo bar x y z 126 foo bar x y z 127 }; 128 my $config = $config_parser->parse( $example ); 129 130 my $tree = [ 131 { 132 name => 'foo', 133 class => 'metadata', 134 value => [ 135 { 136 name => 'a', 137 class => 'scalar', 138 type => 'STR', 139 value => 'x', 140 }, 141 { 142 name => 'b', 143 class => 'scalar', 144 type => 'STR', 145 value => 'y', 146 }, 147 { 148 name => 'c', 149 class => 'scalar', 150 type => 'STR', 151 value => 'z', 152 }, 153 ], 154 }, 155 ]; 156 157 is_deeply( $config, $tree, "MULTI TYPE structure, not declared" ); 158 } 159 160 { 161 my $example = q{ 162 foo MULTI 61 163 bar METADATA 62 164 foo S8 -1
Note:
See TracChangeset
for help on using the changeset viewer.
