File: metar.t

package info (click to toggle)
libgeo-metar-perl 1.12-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 116 kB
  • ctags: 15
  • sloc: perl: 364; makefile: 48
file content (64 lines) | stat: -rwxr-xr-x 748 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/perl

# $Id: metar.t,v 1.3 1999/02/20 23:15:40 jzawodn Exp $

# Test script for METAR installation.

use strict;
use Test;

BEGIN { plan tests => 6 }

use Geo::METAR;

my %tally = (passed => 0, failed => 0, skipped => 0);

print "Testing METAR.\n";

my $m = new Geo::METAR;

# Create a new instance.

if ($m) {
    ok(1);
} else {
    ok(0);
}

# Set to a given user.

if ($m->metar("KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014")) {
    ok(1);
} else {
    ok(0);
}

if ($m->SITE eq "KFDY") {
    ok(1);
} else {
    ok(0);
}

if ($m->DATE eq "25") {
    ok(1);
} else {
    ok(0);
}

if ($m->MOD eq "AUTO") {
    ok(1);
} else {
    ok(0);
}

if ($m->F_TEMP eq "39.2") {
    ok(1);
} else {
    ok(0);
}

exit;

__END__