diff --git a/tests/gts_compare.sh b/tests/gts_compare.sh index 0928aa3bb..88d3d899c 100755 --- a/tests/gts_compare.sh +++ b/tests/gts_compare.sh @@ -10,24 +10,18 @@ . ./include.ctest.sh -#set -x - -#Enter data dir +# Enter data dir cd ${data_dir}/gts -#Define a common label for all the tmp files +# Define a common label for all the tmp files label="gts_compare_test" -#Create log file fLog=${label}".log" rm -f $fLog touch $fLog -#Define tmp GTS file fGtsTmp=${label}".gts.tmp" fRules=${label}".filt" -fBufrInput1=${label}".bufr.input1" -fBufrInput2=${label}".bufr.input2" #---------------------------------------------------- # Test: comparing same files @@ -61,7 +55,14 @@ rm -f error1_1.gts error2_1.gts #---------------------------------------------------- # Test: comparing with and without the -b switch #---------------------------------------------------- -${tools_dir}/gts_compare -b GG $gts_file $fGtsTmp >> $fLog +# Add wrong blocklist. Should still fail +set +e +${tools_dir}/gts_compare -b CCCC $gts_file $fGtsTmp +status=$? +set -e +[ $status -eq 1 ] +# Add correct blocklist +${tools_dir}/gts_compare -b GG $gts_file $fGtsTmp -#Clean up +# Clean up rm -f $fLog $fGtsTmp $fRules diff --git a/tests/metar_compare.sh b/tests/metar_compare.sh index a42b84a92..dd662dab7 100755 --- a/tests/metar_compare.sh +++ b/tests/metar_compare.sh @@ -53,6 +53,13 @@ rm -f error1_1.metar error2_1.metar error1_2.metar error2_2.metar #---------------------------------------------------- # Test: comparing with and without the -b switch #---------------------------------------------------- +# Add wrong blocklist. Should still fail +set +e +${tools_dir}/metar_compare -b CCCC $metar_file $fMetarTmp +status=$? +set -e +[ $status -eq 1 ] +# Add correct blocklist ${tools_dir}/metar_compare -b minute,theMessage $metar_file $fMetarTmp #Clean up