Changeset 6497 for trunk/DataStore/t/02_fileset_parse.t
- Timestamp:
- Feb 24, 2006, 6:48:25 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/DataStore/t/02_fileset_parse.t (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/t/02_fileset_parse.t
r6491 r6497 3 3 # Copyright (C) 2006 Joshua Hoblitt 4 4 # 5 # $Id: 02_fileset_parse.t,v 1. 3 2006-02-25 00:13:36jhoblitt Exp $5 # $Id: 02_fileset_parse.t,v 1.4 2006-02-25 04:48:25 jhoblitt Exp $ 6 6 7 7 use strict; … … 10 10 use lib qw( ./lib ./t ); 11 11 12 use Test::More tests => 38;12 use Test::More tests => 42; 13 13 use Test::Warn; 14 14 … … 114 114 otis0123456|2006-01-01T00:03:04Z|object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 115 115 END 116 my $results = DataStore::FileSet::Parser->new->parse($example1); 116 my $parser = DataStore::FileSet::Parser->new( 117 base_uri => 'http://foo.com/' 118 ); 119 my $results = $parser->parse($example1); 117 120 118 121 is(scalar @$results, 4, "correct number of item returned"); … … 122 125 is(@$results[0]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 123 126 is(@$results[0]->type, 'object', 'correct type'); 127 is(@$results[0]->uri, 'http://foo.com/otis0123456', 'correct uri'); 124 128 125 129 isa_ok(@$results[1], 'DataStore::FileSet::Record'); … … 127 131 is(@$results[1]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 128 132 is(@$results[1]->type, 'object', 'correct type'); 133 is(@$results[1]->uri, 'http://foo.com/otis0123456', 'correct uri'); 129 134 130 135 isa_ok(@$results[2], 'DataStore::FileSet::Record'); … … 132 137 is(@$results[2]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 133 138 is(@$results[2]->type, 'object', 'correct type'); 139 is(@$results[2]->uri, 'http://foo.com/otis0123456', 'correct uri'); 134 140 135 141 isa_ok(@$results[3], 'DataStore::FileSet::Record'); … … 137 143 is(@$results[3]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 138 144 is(@$results[3]->type, 'object', 'correct type'); 145 is(@$results[3]->uri, 'http://foo.com/otis0123456', 'correct uri'); 139 146 } 140 147
Note:
See TracChangeset
for help on using the changeset viewer.
