Changeset 8722 for trunk/DataStore/t/02_fileset_parse.t
- Timestamp:
- Aug 31, 2006, 12:58:34 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/DataStore/t/02_fileset_parse.t (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/t/02_fileset_parse.t
r7951 r8722 3 3 # Copyright (C) 2006 Joshua Hoblitt 4 4 # 5 # $Id: 02_fileset_parse.t,v 1. 7 2006-07-22 01:17:34 smalleExp $5 # $Id: 02_fileset_parse.t,v 1.8 2006-08-31 22:58:34 jhoblitt Exp $ 6 6 7 7 use strict; … … 68 68 my $parser = DataStore::FileSet::Parser->new; 69 69 70 is($parser->parse('|2006-01-01T00:03:04Z| object'), undef,70 is($parser->parse('|2006-01-01T00:03:04Z|OBJECT'), undef, 71 71 '->parse() returns undef on failure'); 72 72 } qr/does not conform /, … … 76 76 my $parser = DataStore::FileSet::Parser->new; 77 77 78 is($parser->parse('foobar|2006-01-0100:03:04Z| object'), undef,78 is($parser->parse('foobar|2006-01-0100:03:04Z|OBJECT'), undef, 79 79 '->parse() returns undef on failure'); 80 80 } qr/does not conform /, … … 109 109 my $example1 =<<END; 110 110 # filesetID|time registered |type |telescope pointing |etime|f|airmass| 111 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |112 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |113 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |114 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |111 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 112 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 113 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 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 116 my $parser = DataStore::FileSet::Parser->new( … … 126 126 my $example1 =<<END; 127 127 # filesetID|time registered |type |telescope pointing |etime|f|airmass| 128 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |129 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |130 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |131 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |128 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 129 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 130 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 131 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 132 132 END 133 133 my $parser = DataStore::FileSet::Parser->new( … … 142 142 is(@$results[0]->fileset, 'otis0123456', 'correct fileset'); 143 143 is(@$results[0]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 144 is(@$results[0]->type, ' object', 'correct type');144 is(@$results[0]->type, 'OBJECT', 'correct type'); 145 145 is(@$results[0]->uri, 'http://foo.com/otis0123456/', 'correct uri'); 146 146 … … 148 148 is(@$results[1]->fileset, 'otis0123456', 'correct fileset'); 149 149 is(@$results[1]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 150 is(@$results[1]->type, ' object', 'correct type');150 is(@$results[1]->type, 'OBJECT', 'correct type'); 151 151 is(@$results[1]->uri, 'http://foo.com/otis0123456/', 'correct uri'); 152 152 … … 154 154 is(@$results[2]->fileset, 'otis0123456', 'correct fileset'); 155 155 is(@$results[2]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 156 is(@$results[2]->type, ' object', 'correct type');156 is(@$results[2]->type, 'OBJECT', 'correct type'); 157 157 is(@$results[2]->uri, 'http://foo.com/otis0123456/', 'correct uri'); 158 158 … … 160 160 is(@$results[3]->fileset, 'otis0123456', 'correct fileset'); 161 161 is(@$results[3]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 162 is(@$results[3]->type, ' object', 'correct type');162 is(@$results[3]->type, 'OBJECT', 'correct type'); 163 163 is(@$results[3]->uri, 'http://foo.com/otis0123456/', 'correct uri'); 164 164 } … … 172 172 173 173 # random comment 174 otis0123456|2006-01-01T00:03:04Z| object|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 |174 otis0123456|2006-01-01T00:03:04Z|OBJECT|11:00:10.33 68:26:59.6 2000|30.0 |r|1.23 | 175 175 176 176 # random comment … … 185 185 is(@$results[0]->fileset, 'otis0123456', 'correct fileset'); 186 186 is(@$results[0]->datetime, '2006-01-01T00:03:04Z', 'correct datetime'); 187 is(@$results[0]->type, ' object', 'correct type');187 is(@$results[0]->type, 'OBJECT', 'correct type'); 188 188 }
Note:
See TracChangeset
for help on using the changeset viewer.
