projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
output: Remove PostScript driver.
[pspp-builds.git]
/
tests
/
expressions
/
epoch.sh
diff --git
a/tests/expressions/epoch.sh
b/tests/expressions/epoch.sh
index 914de328e14d42d565769f11889948cc6aa10b64..1ceab30801673dc06137b1222f29eb19388c072b 100755
(executable)
--- a/
tests/expressions/epoch.sh
+++ b/
tests/expressions/epoch.sh
@@
-4,10
+4,13
@@
TEMPDIR=/tmp/pspp-tst-$$
TEMPDIR=/tmp/pspp-tst-$$
-here=`pwd`;
+# 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
-# ensure that top_srcdir is absolute
-cd $top_srcdir; top_srcdir=`pwd`
STAT_CONFIG_PATH=$top_srcdir/config
export STAT_CONFIG_PATH
STAT_CONFIG_PATH=$top_srcdir/config
export STAT_CONFIG_PATH
@@
-15,6
+18,10
@@
export STAT_CONFIG_PATH
cleanup()
{
cleanup()
{
+ if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
+ echo "NOT cleaning $TEMPDIR"
+ return ;
+ fi
cd /
rm -rf $TEMPDIR
}
cd /
rm -rf $TEMPDIR
}
@@
-135,10
+142,11
@@
EOF
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
-$SUPERVISOR $
here/../src/pspp
--testing-mode $TEMPDIR/epoch.stat > $TEMPDIR/epoch.err 2> $TEMPDIR/epoch.out
+$SUPERVISOR $
PSPP
--testing-mode $TEMPDIR/epoch.stat > $TEMPDIR/epoch.err 2> $TEMPDIR/epoch.out
activity="compare results"
activity="compare results"
-diff -b -B $TEMPDIR/epoch.out - <<EOF
+perl -pi -e 's/^\s*$//g' $TEMPDIR/epoch.out
+diff -b $TEMPDIR/epoch.out - <<EOF
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
@@
-153,7
+161,6
@@
DATE.DMY(1,1,70) = DATE.DMY(1,1,1970) => true
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
-
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
@@
-168,7
+175,6
@@
DATE.DMY(1,1,70) = DATE.DMY(1,1,1970) => true
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
-
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
@@
-183,7
+189,6
@@
DATE.DMY(1,1,70) = DATE.DMY(1,1,1970) => true
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
-
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
@@
-198,7
+203,6
@@
DATE.DMY(1,1,70) = DATE.DMY(1,1,1970) => true
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
DATE.DMY(1,1,87) = DATE.DMY(1,1,1987) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,1999) => true
DATE.DMY(1,1,100) => sysmis
-
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
YRMODA(0,1,1) = YRMODA(1900,1,1) => true
YRMODA(1,1,1) = YRMODA(1901,1,1) => true
YRMODA(12,1,1) = YRMODA(1912,1,1) => true
@@
-214,12
+218,7
@@
DATE.DMY(1,1,87) = DATE.DMY(1,1,2087) => true
DATE.DMY(1,1,99) = DATE.DMY(1,1,2099) => true
DATE.DMY(1,1,100) => sysmis
EOF
DATE.DMY(1,1,99) = DATE.DMY(1,1,2099) => true
DATE.DMY(1,1,100) => sysmis
EOF
-
if [ $? -ne 0 ] ; then no_result ; fi
if [ $? -ne 0 ] ; then no_result ; fi
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-
pass;
pass;