Changeset 12960 for trunk/Nebulous/t/51_client_create.t
- Timestamp:
- Apr 23, 2007, 10:42:29 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/t/51_client_create.t (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/t/51_client_create.t
r5667 r12960 3 3 # Copryight (C) 2004-2005 Joshua Hoblitt 4 4 # 5 # $Id: 51_client_create.t,v 1. 1 2005-12-03 02:52:31jhoblitt Exp $5 # $Id: 51_client_create.t,v 1.2 2007-04-23 20:42:29 jhoblitt Exp $ 6 6 7 7 use strict; … … 10 10 use Apache::Test qw( -withtestmore ); 11 11 12 plan tests => 7;12 plan tests => 11; 13 13 14 14 use lib qw( ./t ./lib ); 15 15 16 #use Nebulous::Client trace => 'debug'; 16 17 use Nebulous::Client; 17 use Nebulous::Util qw( :standard );18 18 use Test::Nebulous; 19 use Test::URI; 20 use URI::Split qw( uri_split ); 19 21 20 22 my $hostport = Apache::Test->config->{ 'hostport' }; … … 28 30 ); 29 31 30 my $ filename = $neb->create( "foo");32 my $uri = $neb->create("foo"); 31 33 32 ok( -e $filename, "good filename" ); 34 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 35 ok(-e $path, "good filename"); 36 uri_scheme_ok($uri, 'file'); 33 37 } 34 38 … … 41 45 ); 42 46 43 my $ filename = $neb->create( "foo", 0);47 my $uri = $neb->create("foo", 0); 44 48 45 ok( -e $filename, "good filename" ); 49 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 50 ok(-e $path, "good filename"); 51 uri_scheme_ok($uri, 'file'); 46 52 } 47 53 … … 54 60 ); 55 61 56 my $ filename = $neb->create( "foo", 0, "node01");62 my $uri = $neb->create("foo", 0, "node01"); 57 63 58 ok( -e $filename, "good filename" ); 64 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 65 ok(-e $path, "good filename"); 66 uri_scheme_ok($uri, 'file'); 59 67 } 60 68 … … 67 75 ); 68 76 69 my $ filename = $neb->create( "foo", 0, "node01", "this is foo");77 my $uri = $neb->create("foo", 0, "node01", "this is foo"); 70 78 71 ok( -e $filename, "good filename" ); 79 my ($scheme, $auth, $path, $query, $frag) = uri_split($uri); 80 ok(-e $path, "good filename"); 81 uri_scheme_ok($uri, 'file'); 72 82 } 73 83 … … 79 89 ); 80 90 81 $neb->create( "foo");82 is( $neb->create( "foo" ), undef, "object already exists");91 $neb->create("foo"); 92 is($neb->create("foo"), undef, "object already exists"); 83 93 } 84 94 … … 92 102 $neb->create(); 93 103 }; 94 like( $@, qr/2 - 4 were expected/, "no params");104 like($@, qr/2 - 4 were expected/, "no params"); 95 105 96 106 Test::Nebulous->setup; … … 101 111 ); 102 112 103 $neb->create( 1, 2, 3, 4, 5);113 $neb->create(1, 2, 3, 4, 5); 104 114 }; 105 like( $@, qr/2 - 4 were expected/, "too many params");115 like($@, qr/2 - 4 were expected/, "too many params"); 106 116 107 117 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
