IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5249


Ignore:
Timestamp:
Oct 7, 2005, 3:21:46 PM (21 years ago)
Author:
jhoblitt
Message:

add tests for "field not allowed to be null" and "not enough fields"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-PSFTP/t/02_parse.t

    r5236 r5249  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: 02_parse.t,v 1.2 2005-10-08 00:27:56 jhoblitt Exp $
     5# $Id: 02_parse.t,v 1.3 2005-10-08 01:21:46 jhoblitt Exp $
    66
    77use strict;
     
    1010use lib qw( ./lib ./t );
    1111
    12 use Test::More qw( no_plan );
     12use Test::More tests => 31;
    1313
    1414use PS::IPP::PSFTP::Parser;
     
    8484}
    8585}
     86
     87{
     88    my $results = $parser->parse(<<END);
     892005-08-06|19:30:01|telescope_2005-08-06T19:30:01||foo=bar:baz=baz|8640|c462d570deb517d9bd92e5bb6a21cc86|http://flaxen.ifa.hawaii.edu/otis/data/metadata/telescope_2005-08-06T19:30:01
     90END
     91    is($results, undef, "field not allowed to be null");
     92}
     93
     94
     95{
     96my $results = $parser->parse(<<END);
     972005-08-06|19:30:01|telescope_2005-08-06T19:30:01|foo=bar:baz=baz|8640|c462d570deb517d9bd92e5bb6a21cc86|http://flaxen.ifa.hawaii.edu/otis/data/metadata/telescope_2005-08-06T19:30:01
     98END
     99    is($results, undef, "not enough fields");
     100}
Note: See TracChangeset for help on using the changeset viewer.