[Kst] kdeextragear-2/kst/tests
George Staikos
staikos at kde.org
Wed Jul 30 07:04:26 CEST 2003
CVS commit by staikos:
Plenty of updates to the test suite. Now generates plots and output. Fixed
a couple of minor bugs from before, and added option -v to specify to run Kst
inside valgrind.
Latest results:
- valgrind clean except for UMRs when accessing unset data inside vectors
(not so bad, still not sure what to do)
- printing empty plots fails (KPrinter mode)
M +63 -3 test1.sh 1.2
--- kdeextragear-2/kst/tests/test1.sh #1.1:1.2
@@ -4,5 +4,8 @@
VALGRIND=
-#VALGRIND="valgrind -v --num-callers=15"
+
+if [ "x$1" == "x-v" ]; then
+ VALGRIND="valgrind -v --num-callers=15";
+fi
@@ -300,9 +303,9 @@
LEN=`wc -l < $VTMPFILE`
if [ "x$LEN" == "x5" ]; then
- echo "Test 198 failed. Expected [5] entries, received [$LEN]."
- return;
+ echo "Test 198 failed. Expected [5] entries, received [$LEN].";
fi
echo -ne "Test 198 passed.\r"
+ rm $VTMPFILE
# Todo - test scalars generated for vectors
@@ -310,5 +313,62 @@
##### Plots
+$DCOP generateVector "plotinput1" 0 1000 10000 >$TMPFILE
+checkStringResponse 500 "plotinput1"
+
+$DCOP generateVector "plotinput2" 0 100 10000 >$TMPFILE
+checkStringResponse 501 "plotinput2"
+
+$DCOP createCurve "curve-ramp" "plotinput1" "plotinput2" "" "" >$TMPFILE
+checkStringResponse 502 "curve-ramp"
+
+$DCOP createCurve "curve-ramp2" "plotinput2" "plotinput1" "" "" >$TMPFILE
+checkStringResponse 503 "curve-ramp2"
+
+$DCOP createPlot "P0" >$TMPFILE
+checkStringResponse 504 "P0"
+
+$DCOP addCurveToPlot "P0" "curve-ramp" >$TMPFILE
+checkStringResponse 505 "true"
+
+$DCOP createPlot "P1" >$TMPFILE
+checkStringResponse 506 "P1"
+
+$DCOP addCurveToPlot "P1" "curve-ramp2" >$TMPFILE
+checkStringResponse 507 "true"
+
+$DCOP createPlot "P2" >$TMPFILE
+checkStringResponse 508 "P2"
+
+$DCOP plotEquation "plotinput1" "2*sin(x)*cos(x^2)" "P2" >$TMPFILE
+checkStringResponse 509 "true"
+
+VTMPFILE=`mktemp /tmp/Kst_TestPrintOut1.png.XXXXXX` || exit 3
+echo "Writing printout image [P0,P1,P2] to $VTMPFILE"
+$DCOP printImage $VTMPFILE >$TMPFILE
+checkStringResponse 510 "true"
+
+VTMPFILE=`mktemp /tmp/Kst_TestPrintOut1.ps.XXXXXX` || exit 3
+echo "Writing printout postscript [P0,P1,P2] to $VTMPFILE"
+$DCOP printPostScript $VTMPFILE >$TMPFILE
+checkStringResponse 511 "true"
+
+$DCOP deletePlot "P1" >$TMPFILE
+checkStringResponse 512 "true"
+
+$DCOP deletePlot "P0" >$TMPFILE
+checkStringResponse 513 "true"
+
+$DCOP deletePlot "P2" >$TMPFILE
+checkStringResponse 514 "true"
+
+VTMPFILE=`mktemp /tmp/Kst_TestPrintOut1.png.XXXXXX` || exit 3
+echo "Writing printout image [blank] to $VTMPFILE"
+$DCOP printImage $VTMPFILE >$TMPFILE
+checkStringResponse 515 "true"
+VTMPFILE=`mktemp /tmp/Kst_TestPrintOut1.ps.XXXXXX` || exit 3
+echo "Writing printout postscript [blank] to $VTMPFILE"
+$DCOP printPostScript $VTMPFILE >$TMPFILE
+checkStringResponse 516 "true"
More information about the Kst
mailing list