IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2007, 10:42:29 AM (19 years ago)
Author:
jhoblitt
Message:

ws
add the use of Test::URI in tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/t/51_client_create.t

    r5667 r12960  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 51_client_create.t,v 1.1 2005-12-03 02:52:31 jhoblitt Exp $
     5# $Id: 51_client_create.t,v 1.2 2007-04-23 20:42:29 jhoblitt Exp $
    66
    77use strict;
     
    1010use Apache::Test qw( -withtestmore );
    1111
    12 plan tests => 7;
     12plan tests => 11;
    1313
    1414use lib qw( ./t ./lib );
    1515
     16#use Nebulous::Client trace => 'debug';
    1617use Nebulous::Client;
    17 use Nebulous::Util qw( :standard );
    1818use Test::Nebulous;
     19use Test::URI;
     20use URI::Split qw( uri_split );
    1921
    2022my $hostport = Apache::Test->config->{ 'hostport' };
     
    2830    );
    2931
    30     my $filename = $neb->create( "foo" );
     32    my $uri = $neb->create("foo");
    3133
    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');
    3337}
    3438
     
    4145    );
    4246
    43     my $filename = $neb->create( "foo", 0 );
     47    my $uri = $neb->create("foo", 0);
    4448
    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');
    4652}
    4753
     
    5460    );
    5561
    56     my $filename = $neb->create( "foo", 0, "node01" );
     62    my $uri = $neb->create("foo", 0, "node01");
    5763
    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');
    5967}
    6068
     
    6775    );
    6876
    69     my $filename = $neb->create( "foo", 0, "node01", "this is foo" );
     77    my $uri = $neb->create("foo", 0, "node01", "this is foo");
    7078
    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');
    7282}
    7383
     
    7989    );
    8090
    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");
    8393}
    8494
     
    92102    $neb->create();
    93103};
    94 like( $@, qr/2 - 4 were expected/, "no params" );
     104like($@, qr/2 - 4 were expected/, "no params");
    95105
    96106Test::Nebulous->setup;
     
    101111    );
    102112
    103     $neb->create( 1, 2, 3, 4, 5 );
     113    $neb->create(1, 2, 3, 4, 5);
    104114};
    105 like( $@, qr/2 - 4 were expected/, "too many params" );
     115like($@, qr/2 - 4 were expected/, "too many params");
    106116
    107117Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.