IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 2, 2009, 4:29:49 PM (17 years ago)
Author:
jhoblitt
Message:

add params checking to Nebulous::Key::parse_neb_key()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/t/75_parse_neb_key.t

    r23932 r24304  
    1010use Test::More;
    1111
    12 plan tests => 99;
     12plan tests => 103;
    1313
    1414use lib qw( ./t ./lib );
     
    322322};
    323323like( $@, qr/requires a path/, "no path" );
     324
     325# params
     326eval {
     327    my $key = parse_neb_key();
     328};
     329like( $@, qr/key param is not optional/, "no params" );
     330
     331eval {
     332    my $key = parse_neb_key(undef);
     333};
     334like( $@, qr/key param is not optional/, "key is undef" );
     335
     336eval {
     337    my $key = parse_neb_key(undef, 'bar');
     338};
     339like( $@, qr/key param is not optional/, "key is undef" );
     340
     341eval {
     342    my $key = parse_neb_key('foo', 'bar', 'foo');
     343};
     344like( $@, qr/too many params/, "too many params" );
Note: See TracChangeset for help on using the changeset viewer.