1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl 1.t'
4 #########################
6 # change 'tests => 1' to 'tests => last_test_to_print';
9 BEGIN { plan tests => 16 };
12 ok(1); # If we made it this far, we're ok.
15 #########################
17 # Insert your test code below, the Test::More module is use()ed here so read
18 # its man page ( perldoc Test::More ) for help writing this test script.
23 ok ($m = new Geo::TAF);
24 ok (! $m->metar("EGSH 311420Z 29010KT 1600 SHSN SCT004 BKN006 01/M02 Q1021"));
25 ok (length $m->as_string > 30);
26 ok ($m->icao eq 'EGSH');
28 ok ($m->pressure == 1021);
30 ok ($m->dewpoint == -2);
31 ok ($m->wind_dir == 290);
32 ok ($m->wind_speed == 10);
33 ok ($m->viz_dist == 1600);
34 ok ($m = new Geo::TAF);
35 ok (! $m->taf("EGSH 311205Z 311322 04010KT 9999 SCT020
36 TEMPO 1319 3000 SHSN BKN008 PROB30
37 TEMPO 1318 0700 +SHSN VV///
38 BECMG 1619 22005KT"));
40 ok ($m->as_chunk_string);