diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index dc0d5e75..cdf0d3af 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,6 +24,7 @@ endfunction() # Copy test data file into buiild directory for testing. copy_test_data(gdaswave.t00z.wcoast.0p16.f000.grib2) +copy_test_data(ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv) # Run these shell tests. shell_test(run_wgrib2_tests) diff --git a/tests/data/ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv b/tests/data/ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv new file mode 100644 index 00000000..ec7e94d5 --- /dev/null +++ b/tests/data/ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv @@ -0,0 +1,19 @@ +1:0:d=2021113000:WIND:surface:anl: +2:15254:d=2021113000:WDIR:surface:anl: +3:37897:d=2021113000:UGRD:surface:anl: +4:53794:d=2021113000:VGRD:surface:anl: +5:69064:d=2021113000:HTSGW:surface:anl: +6:79482:d=2021113000:PERPW:surface:anl: +7:91308:d=2021113000:DIRPW:surface:anl: +8:108541:d=2021113000:WVHGT:surface:anl: +9:116716:d=2021113000:SWELL:1 in sequence:anl: +10:128832:d=2021113000:SWELL:2 in sequence:anl: +11:140848:d=2021113000:SWELL:3 in sequence:anl: +12:151732:d=2021113000:WVPER:surface:anl: +13:161021:d=2021113000:SWPER:1 in sequence:anl: +14:173676:d=2021113000:SWPER:2 in sequence:anl: +15:189425:d=2021113000:SWPER:3 in sequence:anl: +16:205285:d=2021113000:WVDIR:surface:anl: +17:218263:d=2021113000:SWDIR:1 in sequence:anl: +18:237035:d=2021113000:SWDIR:2 in sequence:anl: +19:259223:d=2021113000:SWDIR:3 in sequence:anl: diff --git a/tests/run_wgrib2_tests.sh b/tests/run_wgrib2_tests.sh index f050c098..7848825d 100644 --- a/tests/run_wgrib2_tests.sh +++ b/tests/run_wgrib2_tests.sh @@ -15,8 +15,9 @@ ls -l ../wgrib2 # Run an inventory on a test file. This does not work. #echo "*** testing inventory of gdaswave.t00z.wcoast.0p16.f000.grib2..." -./wgrib2 ../tests/data/gdaswave.t00z.wcoast.0p16.f000.grib2 > tmp.txt +../wgrib2/wgrib2 data/gdaswave.t00z.wcoast.0p16.f000.grib2 > tmp.txt cat tmp.txt +cmp tmp.txt data/ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv echo "*** SUCCESS!" exit 0