projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed intialization of coefficients
[pspp]
/
tests
/
command
/
flip.sh
diff --git
a/tests/command/flip.sh
b/tests/command/flip.sh
index 269939fd01907c0c344ca3446936eaffde93ef3e..29caa1422c5d0e00a09d02ee4bb74f9c55bb497c 100755
(executable)
--- a/
tests/command/flip.sh
+++ b/
tests/command/flip.sh
@@
-3,17
+3,26
@@
# This program tests the flip command
TEMPDIR=/tmp/pspp-tst-$$
# This program tests the flip command
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
# 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()
{
cleanup()
{
+ cd /
rm -rf $TEMPDIR
}
rm -rf $TEMPDIR
}
@@
-47,7
+56,7
@@
cd $TEMPDIR
activity="create flip.stat"
cat > $TEMPDIR/flip.stat <<EOF
activity="create flip.stat"
cat > $TEMPDIR/flip.stat <<EOF
-data list /
n 1 (a) a b c d
2-9.
+data list /
N 1 (a) A B C D
2-9.
list.
begin data.
v 1 2 3 4 5
list.
begin data.
v 1 2 3 4 5
@@
-65,12
+74,13
@@
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
activity="run program"
-$SUPERVISOR $
here/../src/pspp
-o raw-ascii $TEMPDIR/flip.stat
+$SUPERVISOR $
PSPP
-o raw-ascii $TEMPDIR/flip.stat
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare output"
if [ $? -ne 0 ] ; then no_result ; fi
activity="compare output"
-diff -b -B $TEMPDIR/pspp.list - << EOF
-1.1 DATA LIST. Reading 1 record from the command file.
+perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+diff -b $TEMPDIR/pspp.list - << EOF
+1.1 DATA LIST. Reading 1 record from INLINE.
+--------+------+-------+------+
|Variable|Record|Columns|Format|
#========#======#=======#======#
+--------+------+-------+------+
|Variable|Record|Columns|Format|
#========#======#=======#======#
@@
-80,7
+90,6
@@
diff -b -B $TEMPDIR/pspp.list - << EOF
|C | 1| 6- 7|F2.0 |
|D | 1| 8- 9|F2.0 |
+--------+------+-------+------+
|C | 1| 6- 7|F2.0 |
|D | 1| 8- 9|F2.0 |
+--------+------+-------+------+
-
N A B C D
- -- -- -- --
v 1 2 3 4
N A B C D
- -- -- -- --
v 1 2 3 4
@@
-88,14
+97,12
@@
w 6 7 8 9
x 11 12 13 14
y 16 17 18 19
z 21 22 23 24
x 11 12 13 14
y 16 17 18 19
z 21 22 23 24
-
CASE_LBL V W X Y Z
-------- -------- -------- -------- -------- --------
A 1.00 6.00 11.00 16.00 21.00
B 2.00 7.00 12.00 17.00 22.00
C 3.00 8.00 13.00 18.00 23.00
D 4.00 9.00 14.00 19.00 24.00
CASE_LBL V W X Y Z
-------- -------- -------- -------- -------- --------
A 1.00 6.00 11.00 16.00 21.00
B 2.00 7.00 12.00 17.00 22.00
C 3.00 8.00 13.00 18.00 23.00
D 4.00 9.00 14.00 19.00 24.00
-
CASE_LBL A B C D
-------- -------- -------- -------- --------
V 1.00 2.00 3.00 4.00
CASE_LBL A B C D
-------- -------- -------- -------- --------
V 1.00 2.00 3.00 4.00