Changeset 15021 for trunk/DataStore/t/06_fileset.t
- Timestamp:
- Sep 25, 2007, 1:50:34 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/DataStore/t/06_fileset.t (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/t/06_fileset.t
r8722 r15021 3 3 # Copyright (C) 2006 Joshua Hoblitt 4 4 # 5 # $Id: 06_fileset.t,v 1. 8 2006-08-31 22:58:34 jhoblitt Exp $5 # $Id: 06_fileset.t,v 1.9 2007-09-25 23:50:34 jhoblitt Exp $ 6 6 7 7 use strict; … … 10 10 use lib qw( ./lib ./t ); 11 11 12 use Test::More tests => 1 8;12 use Test::More tests => 19; 13 13 14 14 =head1 NAME … … 33 33 { 34 34 my $dsf = DataStore::FileSet->new( 35 uri => 'http://example.org/ ',35 uri => 'http://example.org/index.txt', 36 36 fileset => '12buckelyourshoe', 37 37 datetime => '2042-01-01T00:00:00Z', … … 44 44 eval { 45 45 my $dsf = DataStore::FileSet->new( 46 uri => 'http://example.org/ ',46 uri => 'http://example.org/index.txt', 47 47 fileset => '12buckelyourshoe', 48 48 datetime => '2042-01-01T00:00:00Z', … … 57 57 my $dsf = DataStore::FileSet->new( uri => 'http://example.org' ); 58 58 }; 59 like($@, qr/ is valid uri dirname/,59 like($@, qr/uri ends with \/index.txt/, 60 60 '->new() fails when uri param does not end with /'); 61 61 62 62 eval { 63 my $dsf = DataStore::FileSet->new( uri => '://example.org' ); 63 my $dsf = DataStore::FileSet->new( uri => 'http://example.org/index.html' ); 64 }; 65 like($@, qr/uri ends with \/index.txt/, 66 '->new() fails when uri param does not end with /'); 67 68 eval { 69 my $dsf = DataStore::FileSet->new( uri => '://example.org/index.txt' ); 64 70 }; 65 71 like($@, qr/is valid http uri/, … … 105 111 print $server->Start(), "\n"; 106 112 107 $server->RegisterURL('/ ', \&bar);113 $server->RegisterURL('/index.txt', \&bar); 108 114 $server->Process(); # Run forever 109 115 … … 116 122 { 117 123 my $dsp = DataStore::FileSet->new( 118 uri => "http://localhost:$port/ ",124 uri => "http://localhost:$port/index.txt", 119 125 fileset => '12buckelyourshoe', 120 126 datetime => '2042-01-01T00:00:00Z', … … 127 133 { 128 134 my $dsp = DataStore::FileSet->new( 129 uri => "http://localhost:$port/ ",135 uri => "http://localhost:$port/index.txt", 130 136 fileset => '12buckelyourshoe', 131 137 datetime => '2042-01-01T00:00:00Z', … … 154 160 eval { 155 161 my $dsf = DataStore::FileSet->new( 156 uri => 'http://example.org/ ',162 uri => 'http://example.org/index.txt', 157 163 fileset => '12buckelyourshoe', 158 164 datetime => '2042-01-01T00:00:00Z',
Note:
See TracChangeset
for help on using the changeset viewer.
