IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2007, 12:02:11 PM (19 years ago)
Author:
jhoblitt
Message:

ws

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/t/09_server_stat_object.t

    r10546 r12646  
    33# Copryight (C) 2004-2005  Joshua Hoblitt
    44#
    5 # $Id: 09_server_stat_object.t,v 1.8 2006-12-08 03:29:19 jhoblitt Exp $
     5# $Id: 09_server_stat_object.t,v 1.9 2007-03-28 22:01:37 jhoblitt Exp $
    66
    77use strict;
     
    2525
    2626{
    27     my $uri = $neb->create_object( "foo" );
     27    my $uri = $neb->create_object("foo");
    2828
    29     my $info = $neb->stat_object( "foo" );
     29    my $info = $neb->stat_object("foo");
    3030
    31     is( scalar @$info, 8, "number of columns" );
     31    is(scalar @$info, 8, "number of columns");
    3232}
    3333
     
    3535
    3636{
    37     my $uri = $neb->create_object( "foo", 0, "node01", "foobar" );
     37    my $uri = $neb->create_object("foo", 0, "node01", "foobar");
    3838
    39     my $info = $neb->stat_object( "foo" );
     39    my $info = $neb->stat_object("foo");
    4040
    41     is( scalar @$info, 8,                       "number of columns" );
    42     is( @$info[0], 1,                           "so_id" );
    43     is( @$info[1], "foo",                       "ext_id" );
    44     is( @$info[2], 0,                           "class_id" );
    45     is( @$info[3], "foobar",                    "comment" );
    46     is( @$info[4], 0,                           "read lock" );
    47     is( @$info[5], undef,                       "write lock" );
    48     like( @$info[6], qr/....-..-.. ..:..:../,   "epoch" );
    49     like( @$info[6], qr/....-..-.. ..:..:../,   "mtime" );
     41    is(scalar @$info, 8,                       "number of columns");
     42    is(@$info[0], 1,                           "so_id");
     43    is(@$info[1], "foo",                       "ext_id");
     44    is(@$info[2], 0,                           "class_id");
     45    is(@$info[3], "foobar",                    "comment");
     46    is(@$info[4], 0,                           "read lock");
     47    is(@$info[5], undef,                       "write lock");
     48    like(@$info[6], qr/....-..-.. ..:..:../,   "epoch");
     49    like(@$info[6], qr/....-..-.. ..:..:../,   "mtime");
    5050}
    5151
     
    5353
    5454eval {
    55     $neb->stat_object( "foo" );
     55    $neb->stat_object("foo");
    5656};
    57 like( $@, qr/no storage object found/, "object does not exist" );
     57like($@, qr/no storage object found/, "object does not exist");
    5858
    5959Test::Nebulous->setup;
     
    6262    $neb->stat_object();
    6363};
    64 like( $@, qr/1 was expected/, "no params" );
     64like($@, qr/1 was expected/, "no params");
    6565
    6666Test::Nebulous->setup;
    6767
    6868eval {
    69     $neb->stat_object( "foo", 2 );
     69    $neb->stat_object("foo", 2);
    7070};
    71 like( $@, qr/1 was expected/, "too many params" );
     71like($@, qr/1 was expected/, "too many params");
    7272
    7373Test::Nebulous->cleanup;
Note: See TracChangeset for help on using the changeset viewer.