Checkin of new directory structure.
[pspp-builds.git] / tests / command / examine-percentiles.sh
index 0d23b41feb03334f7f7c6194c9f4eb09ac55d024..ea918c808cb0181fd4d1c934fc3916e58230f0ff 100755 (executable)
@@ -7,10 +7,13 @@
 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`
 
 # ensure that top_srcdir is absolute
-cd $top_srcdir; top_srcdir=`pwd`
+top_srcdir=`cd $top_srcdir; pwd`
 
 STAT_CONFIG_PATH=$top_srcdir/config
 export STAT_CONFIG_PATH
@@ -77,19 +80,19 @@ EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
+$SUPERVISOR $top_builddir/src/pspp -o raw-ascii $TESTFILE
 if [ $? -ne 0 ] ; then no_result ; fi
 
 
 activity="compare results"
-diff -b -B $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST.  Reading free-form data from the command file.
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff -b  $TEMPDIR/pspp.list - << EOF
+1.1 DATA LIST.  Reading free-form data from INLINE.
 +--------+------+
 |Variable|Format|
 #========#======#
 |X       |F8.0  |
 +--------+------+
-
 2.1 EXAMINE.  Case Processing Summary
 #=#=============================#
 # #            Cases            #
@@ -100,7 +103,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #=#=#=======#=#=======#=#=======#
 #X#3|   100%|0|     0%|3|   100%#
 #=#=#=======#=#=======#=#=======#
-
 2.2 EXAMINE.  Percentiles
 #================#================================#
 #                #             Percentiles        #
@@ -110,7 +112,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #X|HAverage      #.40|.80|2.00|5.00|8.00|8.00|8.00#
 # |Tukey's Hinges#   |   |3.50|5.00|6.50|    |    #
 #=#==============#===#===#====#====#====#====#====#
-
 3.1 EXAMINE.  Case Processing Summary
 #=#=============================#
 # #            Cases            #
@@ -121,7 +122,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #=#=#=======#=#=======#=#=======#
 #X#3|   100%|0|     0%|3|   100%#
 #=#=#=======#=#=======#=#=======#
-
 3.2 EXAMINE.  Percentiles
 #==================#================================#
 #                  #             Percentiles        #
@@ -131,7 +131,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #X|Weighted Average#.30|.60|1.50|3.50|5.75|7.10|7.55#
 # |Tukey's Hinges  #   |   |3.50|5.00|6.50|    |    #
 #=#================#===#===#====#====#====#====#====#
-
 4.1 EXAMINE.  Case Processing Summary
 #=#=============================#
 # #            Cases            #
@@ -142,7 +141,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #=#=#=======#=#=======#=#=======#
 #X#3|   100%|0|     0%|3|   100%#
 #=#=#=======#=#=======#=#=======#
-
 4.2 EXAMINE.  Percentiles
 #================#================================#
 #                #             Percentiles        #
@@ -152,7 +150,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #X|Rounded       #.00|.00|2.00|5.00|5.00|8.00|8.00#
 # |Tukey's Hinges#   |   |3.50|5.00|6.50|    |    #
 #=#==============#===#===#====#====#====#====#====#
-
 5.1 EXAMINE.  Case Processing Summary
 #=#=============================#
 # #            Cases            #
@@ -163,7 +160,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #=#=#=======#=#=======#=#=======#
 #X#3|   100%|0|     0%|3|   100%#
 #=#=#=======#=#=======#=#=======#
-
 5.2 EXAMINE.  Percentiles
 #================#==================================#
 #                #              Percentiles         #
@@ -173,7 +169,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #X|Empirical     #2.00|2.00|2.00|5.00|8.00|8.00|8.00#
 # |Tukey's Hinges#    |    |3.50|5.00|6.50|    |    #
 #=#==============#====#====#====#====#====#====#====#
-
 6.1 EXAMINE.  Case Processing Summary
 #=#=============================#
 # #            Cases            #
@@ -184,7 +179,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #=#=#=======#=#=======#=#=======#
 #X#3|   100%|0|     0%|3|   100%#
 #=#=#=======#=#=======#=#=======#
-
 6.2 EXAMINE.  Percentiles
 #==========================#==================================#
 #                          #              Percentiles         #
@@ -194,7 +188,6 @@ diff -b -B $TEMPDIR/pspp.list - << EOF
 #X|Empirical with averaging#2.00|2.00|2.00|5.00|8.00|8.00|8.00#
 # |Tukey's Hinges          #    |    |3.50|5.00|6.50|    |    #
 #=#========================#====#====#====#====#====#====#====#
-
 EOF
 if [ $? -ne 0 ] ; then fail ; fi