my
$TEST_FILE
;
foreach
my
$inc
(
@INC
) {
if
(-e
"$inc/Geo/Sample-GRIB/akw.HTSGW.grb"
) {
$TEST_FILE
=
"$inc/Geo/Sample-GRIB/akw.HTSGW.grb"
;
last
;
}
}
ok(-e
"$TEST_FILE"
) or
diag(
"Path to sample GRIB file not found"
);
my
$w
= Geo::ReadGRIB->new(
"$TEST_FILE"
);
ok(
$w
->{TIME} == 1142078400 ) or
diag(
"base time should be 1142078400"
);
ok(
$w
->{LAST_TIME} == 1142726400 ) or
diag(
"last time should be 1142726400"
);
foreach
my
$inc
(
@INC
) {
if
(-e
"$inc/Geo/Sample-GRIB/2009100900_P000.grib"
) {
$TEST_FILE
=
"$inc/Geo/Sample-GRIB/2009100900_P000.grib"
;
last
;
}
}
ok(-e
"$TEST_FILE"
) or
diag(
"Path to sample GRIB file not found"
);
$w
= Geo::ReadGRIB->new(
"$TEST_FILE"
);
ok(
$w
->{TIME} == 1255046400 ) or
diag(
"base time should be 1142078400"
);
ok(
$w
->{TIME} == 1255046400 ) or
diag(
"last time should be 1255046400"
);