X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Ftabs.sh;h=93f4c01dd601330ec709eba031f4d3d46c0b0662;hb=7e8eec6839205801adddbd6fafb2ceaf7c601d08;hp=0a2915f3e8e362453b110e948b3d14e69c6b9375;hpb=c0ed03fd27298cf2b18f0fb373e919ab8b4ae4f4;p=pspp diff --git a/tests/command/tabs.sh b/tests/command/tabs.sh index 0a2915f3e8..93f4c01dd6 100755 --- a/tests/command/tabs.sh +++ b/tests/command/tabs.sh @@ -3,17 +3,20 @@ # This program tests that tab characters can be used in string input TEMPDIR=/tmp/pspp-tst-$$ +TESTFILE=$TEMPDIR/`basename $0`.sps here=`pwd`; # ensure that top_srcdir is absolute cd $top_srcdir; top_srcdir=`pwd` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -47,13 +50,13 @@ cd $TEMPDIR activity="create program 1" cat > $TEMPDIR/tabs.stat <> $TEMPDIR/tabs.stat +printf "\t1\t12\t123\t1234\t12345\n" >> $TEMPDIR/tabs.stat if [ $? -ne 0 ] ; then no_result ; fi @@ -67,18 +70,19 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$here/../src/pspp -o raw-ascii $TEMPDIR/tabs.stat +$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/tabs.stat if [ $? -ne 0 ] ; then no_result ; fi -diff -B -b $TEMPDIR/pspp.list - << EOF +perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list +diff -b $TEMPDIR/pspp.list - << EOF | perl -e 's/^\s*$//g' 1.1 DATA LIST. Reading 1 record from the command file. +--------+------+-------+------+ |Variable|Record|Columns|Format| #========#======#=======#======# |X | 1| 1- 80|A80 | +--------+------+-------+------+ - 1 12 123 1234 12345 123456 1234567 12345678 + 1 12 123 1234 12345 EOF if [ $? -ne 0 ] ; then fail ; fi