diff --git a/ms/MSSel/test/tMSTimeGram.out b/ms/MSSel/test/tMSTimeGram.out new file mode 100644 index 00000000000..1fc92dd16b0 --- /dev/null +++ b/ms/MSSel/test/tMSTimeGram.out @@ -0,0 +1,8 @@ +Original table has rows 1058 +TableExprNode has rows = 1058 +After mssel constructor called +selected table has rows 46 +Original table has rows 1058 +TableExprNode has rows = 1058 +After mssel constructor called +selected table has rows 46 diff --git a/ms/MSSel/test/tMSTimeGram.run b/ms/MSSel/test/tMSTimeGram.run index 66c49c44a31..b9afb93e26c 100644 --- a/ms/MSSel/test/tMSTimeGram.run +++ b/ms/MSSel/test/tMSTimeGram.run @@ -1,3 +1,41 @@ #! /bin/sh -echo "UNTESTED" -exit 3 +# ----------------------------------------------------------------------------- +# Usage: tMSTimeGram.run +# ----------------------------------------------------------------------------- +# This script executes the program tMSTimeGram to test the +# MSTimeGram module. +# +# $Id$ +#----------------------------------------------------------------------------- + + MS=$CASADEMO"mssel_test_small.ms" + + runCmd(){ + # Uncomment following line to generate an output close to a + # script to run the tests + #echo "#Test:$1"; echo $3; + + eval "$2 $3" + } + + getTestMS() { + tar zxf $testsrcdir/$MS.tgz + } + + cleanup() { + \rm -rf $MS + } + + # Get the test MS (un-tar it from $testsrcdir). + getTestMS; + + # T1~T2 syntax: selects single timestamp, 2014/09/20/10:37:51.360000 + runCmd 1 "$casa_checktool" " ./tMSTimeGram $MS '2014/09/20/10:37:51.0~10:37:51.5'"; + + # T+dT syntax: selects single timestamp, 2014/09/20/10:37:51.360000 + runCmd 2 "$casa_checktool" " ./tMSTimeGram $MS '2014/09/20/10:37:51.0+0:0:0.5'"; + + # + # Remove the test MS and any other cleanup required. + # + cleanup;