X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Fcommand%2Fprint.sh;h=a7e5b655210f45faeaab715e6450a1c1e25f1de4;hb=d87ef24cc012a5eb67bb98fad972d29f36f18f48;hp=33d47a7d56a3de42c90da4cd204fd84886b294f1;hpb=97d6c6f6b1922621ca013668eba9a9a9f71d60fe;p=pspp-builds.git diff --git a/tests/command/print.sh b/tests/command/print.sh index 33d47a7d..a7e5b655 100755 --- a/tests/command/print.sh +++ b/tests/command/print.sh @@ -3,17 +3,26 @@ # This program tests the PRINT transformation TEMPDIR=/tmp/pspp-tst-$$ +TESTFILE=$TEMPDIR/`basename $0`.sps -here=`pwd`; +# ensure that top_builddir are absolute +if [ -z "$top_builddir" ] ; then top_builddir=. ; fi +if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi +top_builddir=`cd $top_builddir; pwd` +PSPP=$top_builddir/src/ui/terminal/pspp # ensure that top_srcdir is absolute -cd $top_srcdir; top_srcdir=`pwd` +top_srcdir=`cd $top_srcdir; pwd` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH +LANG=C +export LANG cleanup() { + cd / rm -rf $TEMPDIR } @@ -56,7 +65,7 @@ cat > $TEMPDIR/print.stat << foobar title 'Test PRINT transformation'. data list free table file='$TEMPDIR/data-list.data'/A B C D. -print outfile="foo" table/A(f8.2) '/' B(e8.2) '/' C(n10) '/' D(rbhex16) '/'. +print outfile="foo" table/A(f8.2) '/' B(e8.2) '/' C(n10) '/'. print space a. print outfile="foo" /a b c d. list. @@ -70,18 +79,18 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii --testing-mode $TEMPDIR/print.stat > $TEMPDIR/errs +$SUPERVISOR $PSPP --testing-mode -o raw-ascii --testing-mode $TEMPDIR/print.stat > $TEMPDIR/errs # Note vv --- there are errors in input. Therefore, the command must FAIL if [ $? -eq 0 ] ; then fail ; fi activity="compare error messages" diff -w $TEMPDIR/errs - <