pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/tests/bugs freq-nolabels.sh


From: John Darrington
Subject: [Pspp-cvs] pspp/tests/bugs freq-nolabels.sh
Date: Fri, 22 Dec 2006 21:46:12 +0000

CVSROOT:        /sources/pspp
Module name:    pspp
Changes by:     John Darrington <jmd>   06/12/22 21:46:12

Added files:
        tests/bugs     : freq-nolabels.sh 

Log message:
        Checked in missed file.  Thanks to Ben Pfaff for the reminder.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/tests/bugs/freq-nolabels.sh?cvsroot=pspp&rev=1.1

Patches:
Index: freq-nolabels.sh
===================================================================
RCS file: freq-nolabels.sh
diff -N freq-nolabels.sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ freq-nolabels.sh    22 Dec 2006 21:46:12 -0000      1.1
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# This program tests for a bug which crashed frequencies when the
+# /FORMAT=nolabels was given.
+
+TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
+
+# ensure that top_srcdir and top_builddir  are absolute
+if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
+if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
+top_srcdir=`cd $top_srcdir; pwd`
+top_builddir=`cd $top_builddir; pwd`
+
+PSPP=$top_builddir/src/ui/terminal/pspp
+
+STAT_CONFIG_PATH=$top_srcdir/config
+export STAT_CONFIG_PATH
+
+LANG=C
+export LANG
+
+
+cleanup()
+{
+     if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then 
+       echo "NOT cleaning $TEMPDIR"
+       return ; 
+     fi
+     rm -rf $TEMPDIR
+}
+
+
+fail()
+{
+    echo $activity
+    echo FAILED
+    cleanup;
+    exit 1;
+}
+
+
+no_result()
+{
+    echo $activity
+    echo NO RESULT;
+    cleanup;
+    exit 2;
+}
+
+pass()
+{
+    cleanup;
+    exit 0;
+}
+
+mkdir -p $TEMPDIR
+
+cd $TEMPDIR
+
+activity="create script"
+cat > $TESTFILE  <<EOF
+DATA LIST LIST /x * w *.
+BEGIN DATA.
+1 4
+2 2
+END DATA.
+
+WEIGHT BY w.
+
+FREQUENCIES x
+  /FORMAT=nolabels
+  .
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+
+
+activity="run program"
+$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+if [ $? -ne 0 ] ; then no_result ; fi
+
+
+
+pass;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]