X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fattributes.sh;h=a42a1aa80bb2c14eb4e9e0a0564e255924a8e625;hb=551ae7c01afa80b03caf6a61975c13de0696c9f3;hp=d4d36e603a737ce4e64081fb174266e91314c390;hpb=b5c82cc9aabe7e641011130240ae1b2e84348e23;p=pspp diff --git a/tests/command/attributes.sh b/tests/command/attributes.sh index d4d36e603a..a42a1aa80b 100755 --- a/tests/command/attributes.sh +++ b/tests/command/attributes.sh @@ -11,7 +11,7 @@ TESTFILE=$TEMPDIR/`basename $0`.sps 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 +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT # ensure that top_srcdir is absolute top_srcdir=`cd $top_srcdir; pwd` @@ -96,52 +96,37 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare output" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b -w $TEMPDIR/pspp.list - << EOF -1.1 DISPLAY. -+--------+-----------------+-----------------------------------+ -|Variable|Description | | -#========#=================#===================================# -|a |Custom attributes| | -| |ValidationRule[1]|a * b > 3 | -| |ValidationRule[2]|a + b > 2 | -+--------+-----------------+-----------------------------------+ -|b |Custom attributes| | -| |ValidationRule[1]|a * b > 3 | -| |ValidationRule[2]|a + b > 2 | -+--------+-----------------+-----------------------------------+ -|c |Custom attributes| | -| |QuestionWording |X or Y? | -+--------+-----------------+-----------------------------------+ -1.2 DISPLAY. Custom data file attributes. -+---------+---------------+ -|Attribute|Value | -#=========#===============# -|array[1] |array element 1| -|array[2] |array element 2| -|key |value | -+---------+---------------+ -2.1 DISPLAY. -+--------+---------------+-----------------------------------+ -|Variable|Description | | -#========#===============#===================================# -|b |Custom attribut|s: | -| |ValidationRule |a * b > 3 | -+--------+---------------+-----------------------------------+ -|c |Custom attribut|s: | -| |QuestionWording|X or Y? | -+--------+---------------+-----------------------------------+ -2.2 DISPLAY. Custom data file attributes. -+---------+---------------+ -|Attribute|Value | -#=========#===============# -|array |array element 2| -|key |value | -+---------+---------------+ +diff -c $TEMPDIR/pspp.csv - << EOF +Variable,Description, +a,Custom attributes:, +,ValidationRule[1],a * b > 3 +,ValidationRule[2],a + b > 2 +b,Custom attributes:, +,ValidationRule[1],a * b > 3 +,ValidationRule[2],a + b > 2 +c,Custom attributes:, +,QuestionWording,X or Y? + +Table: Custom data file attributes. +Attribute,Value +array[1],array element 1 +array[2],array element 2 +key,value + +Variable,Description, +b,Custom attributes:, +,ValidationRule,a * b > 3 +c,Custom attributes:, +,QuestionWording,X or Y? + +Table: Custom data file attributes. +Attribute,Value +array,array element 2 +key,value EOF if [ $? -ne 0 ] ; then fail ; fi