IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5251


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

add some warning tests

File:
1 edited

Legend:

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

    r5249 r5251  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: 02_parse.t,v 1.3 2005-10-08 01:21:46 jhoblitt Exp $
     5# $Id: 02_parse.t,v 1.4 2005-10-08 01:56:05 jhoblitt Exp $
    66
    77use strict;
     
    1010use lib qw( ./lib ./t );
    1111
    12 use Test::More tests => 31;
     12use Test::More tests => 33;
    1313
    1414use PS::IPP::PSFTP::Parser;
     15use Test::Warn;
    1516
    1617my $example1 =<<END;
     
    8586}
    8687
    87 {
     88warning_like {
    8889    my $results = $parser->parse(<<END);
    89902005-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
    9091END
    9192    is($results, undef, "field not allowed to be null");
    92 }
     93} qr/record: .*? is missing required field/,
     94    "warning for null required field";
    9395
    94 
    95 {
     96warning_like {
    9697my $results = $parser->parse(<<END);
    97982005-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
    9899END
    99100    is($results, undef, "not enough fields");
    100 }
     101} qr/record: .*? is missing required field/,
     102    "warning for missing required field";
Note: See TracChangeset for help on using the changeset viewer.