From c0a38a2d3c15f03927cb00a64565bda256d723d6 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sun, 31 Dec 2023 17:23:54 +0000 Subject: [PATCH] Testing: Tools options --- tests/gts_get.sh | 6 ++++++ tests/metar_get.sh | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/gts_get.sh b/tests/gts_get.sh index 0bea9b259..2f50f10f6 100755 --- a/tests/gts_get.sh +++ b/tests/gts_get.sh @@ -26,6 +26,12 @@ fTmp=${label}".tmp.txt" gts_file=EGRR20150317121020_00493212.DAT ${tools_dir}/gts_get -p TT,AA,II,CCCC,YY,GG,gg,BBB $gts_file >/dev/null +#---------------------------------------------- +# Test "-w" switch +#---------------------------------------------- +${tools_dir}/gts_get -p TT -w count=3 $gts_file >/dev/null + + gts_file=${data_dir}/gts.grib result=$( ${tools_dir}/grib_get -wcount=1 -p gts_CCCC -g $gts_file ) [ "$result" = "ECMG" ] diff --git a/tests/metar_get.sh b/tests/metar_get.sh index 7f69c4dfb..e58ede316 100755 --- a/tests/metar_get.sh +++ b/tests/metar_get.sh @@ -25,15 +25,16 @@ touch $fLog fTmp=${label}".tmp.txt" rm -f $fTmp -#---------------------------------------------- -# Test default "ls" on all the metar data files -#---------------------------------------------- +#----------------------------------------- +# Test default "ls" on the metar data file +#----------------------------------------- metar_file=metar.txt export METAR_YEAR=2015 export METAR_MONTH=4 ${tools_dir}/metar_get -n ls $metar_file >/dev/null ${tools_dir}/metar_get -w count=1/2/3 -p CCCC,latitude,longitude,dateTime,elevation,temperature,dewPointTemperature,qnh $metar_file +${tools_dir}/metar_get -w count=2 -p CCCC $metar_file # Decode a 'group' key as int and double result=$( ${tools_dir}/metar_get -p visibilityInMetres:i,visibilityInMetres:d -w count=1 $metar_file )