From 79240dcf50d4d2f9b2742ff4638d8cf8969c2f98 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 16 Dec 2003 23:44:28 +0000 Subject: [PATCH] Fixed a problem with some tests --- src/cmdline.c | 2 +- tests/command/print.sh | 28 ++++++--------- tests/command/sort.sh | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 19 deletions(-) create mode 100755 tests/command/sort.sh diff --git a/src/cmdline.c b/src/cmdline.c index bb9b9bab..cd29b990 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -171,7 +171,7 @@ parse_command_line (int argc, char **argv) if (set_testing_mode) { /* FIXME: Later this option should do some other things, too. */ - set_viewwidth = 79; + set_viewwidth = 9999; } for (i = optind; i < argc; i++) diff --git a/tests/command/print.sh b/tests/command/print.sh index fbdb6c90..77daac3a 100755 --- a/tests/command/print.sh +++ b/tests/command/print.sh @@ -86,34 +86,26 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$here/../src/pspp -o raw-ascii $TEMPDIR/print.stat > $TEMPDIR/errs +$here/../src/pspp -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 -b -B $TEMPDIR/errs - < $TEMPDIR/sort.stat < $TEMPDIR/sortsort +if [ $? -ne 0 ] ; then no_result ; fi + +diff -B -b $TEMPDIR/sortsort $TEMPDIR/pspp.list +if [ $? -ne 0 ] ; then fail ; fi + +# 2. It should be six elements wide +activity="check data width" +awk '!/^\ *$/{if (NF!=6) exit 1}' $TEMPDIR/pspp.list +if [ $? -ne 0 ] ; then fail ; fi + + +pass; -- 2.30.2