From: <and...@us...> - 2009-01-06 15:18:56
|
Revision: 9262 http://plplot.svn.sourceforge.net/plplot/?rev=9262&view=rev Author: andrewross Date: 2009-01-06 15:18:53 +0000 (Tue, 06 Jan 2009) Log Message: ----------- Add example 14 to the list of non-interactive tests. For most languages this involves redirecting stdin to input the file name for the output file in the second stream. Fix up various implementations of example 14 to ensure consistent results with C version. Update C version of example 14 to set familying settings for 2nd stream based on 1st stream to ensure that devices like png work correctly. (Change not yet propagated to all other languages - see plplot-devel list for other related issues.) Modified Paths: -------------- trunk/bindings/octave/demos/x14c.m trunk/examples/ada/x14a.adb.cmake trunk/examples/ada/xthick14a.adb.cmake trunk/examples/c/x14c.c trunk/examples/c++/x14.cc trunk/examples/f77/x14f.fm4 trunk/examples/f95/x14f.f90 trunk/examples/java/x14.java trunk/examples/perl/x14.pl trunk/plplot_test/test_ada.sh.in trunk/plplot_test/test_c.sh.in trunk/plplot_test/test_cxx.sh.in trunk/plplot_test/test_diff.sh.in trunk/plplot_test/test_f77.sh.in trunk/plplot_test/test_f95.sh.in trunk/plplot_test/test_java.sh.in trunk/plplot_test/test_ocaml.sh.in trunk/plplot_test/test_octave.sh.in trunk/plplot_test/test_perl.sh.in trunk/plplot_test/test_python.sh.in trunk/plplot_test/test_tcl.sh.in Modified: trunk/bindings/octave/demos/x14c.m =================================================================== --- trunk/bindings/octave/demos/x14c.m 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/bindings/octave/demos/x14c.m 2009-01-06 15:18:53 UTC (rev 9262) @@ -24,8 +24,12 @@ 1; -function ix14c +function ix14c(fname2,strm) + if (nargin < 2) + strm = stdout; + endif + if (!exist("plinit")) plplot_stub endif @@ -33,9 +37,10 @@ device = sprintf("%s",plgdev'); if(isempty(device)) device = "xwin"; - plsdev(device); endif + [fam, num, bmax] = plgfam(); + xleng0 = 400; yleng0 = 300; xoff0 = 200; yoff0 = 200; xleng1 = 400; yleng1 = 300; xoff1 = 500; yoff1 = 500; @@ -44,16 +49,24 @@ geometry_master = "500x410+100+200"; geometry_slave = "500x410+650+200"; - printf("Demo of multiple output streams via the %s driver.\n", device); - printf("Running with the second (right) window as slave.\n"); - printf("To advance to the next plot, press the third mouse button\n"); - printf("or the enter key in the first (left) window\n"); + fprintf(strm,"Demo of multiple output streams via the %s driver.\n", device); + fprintf(strm,"Running with the second stream as slave to the first.\n"); + ##fprintf(strm,"To advance to the next plot, press the third mouse button\n"); + ##fprintf(strm,"or the enter key in the first (left) window\n"); + ## This is an entirely bogus message since the output file name is + ## set by the function arguments - but it does ensure that stdout + ## is identical to the C version of the example for ctest. + if (strm != stdout) + fprintf(strm,"\nEnter graphics output file name: "); + endif + fflush(stdout); ## Set up first stream */ plSetOpt("geometry", geometry_master); + plsdev(device); plssub(2,2); plinit(); @@ -66,7 +79,14 @@ plSetOpt("geometry", geometry_slave); plspause(0); - plsdev(device) + ## This is an addition to C version to allow second file name to be + ## set as a function argument. This is required for the test scripts. + if (nargin >= 1) + plsfnam(fname2); + endif + + plsdev(device); + plsfam(fam,num,bmax); plinit(); ## Set up the data & plot */ @@ -248,7 +268,7 @@ function plot4() - dtr = 3.141592654 / 180.0; + dtr = pi / 180.0; zz=0:360; x0 = cos(dtr * zz'); @@ -281,7 +301,7 @@ ## Write labels for angle */ - if (dx >= 0) + if (dx >= -0.00001) plptex(dx, dy, dx, dy, -0.15, text); else plptex(dx, dy, -dx, -dy, 1.15, text); @@ -329,9 +349,9 @@ ## Set up function arrays */ for i = 0:XPTS-1 - xx = (i - (XPTS / 2)) / (XPTS / 2); + xx = (i - fix(XPTS / 2)) / fix(XPTS / 2); for j = 0:YPTS-1 - yy = (j - (YPTS / 2)) / (YPTS / 2) - 1.0; + yy = (j - fix(YPTS / 2)) / fix(YPTS / 2) - 1.0; z(i+1,j+1) = xx * xx - yy * yy; w(i+1,j+1) = 2 * xx * yy; endfor @@ -348,4 +368,12 @@ plflush;#pleop(); endfunction -ix14c +if (exist("file2","var")) + if (exist("strm","var")) + ix14c(file2,strm); + else + ix14c(file2); + endif +else + ix14c() +endif Modified: trunk/examples/ada/x14a.adb.cmake =================================================================== --- trunk/examples/ada/x14a.adb.cmake 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/ada/x14a.adb.cmake 2009-01-06 15:18:53 UTC (rev 9262) @@ -296,7 +296,7 @@ driver := To_Unbounded_String(plgdev); - Put_Line("Demo of multiple output streams via the " & plgdev & "driver."); + Put_Line("Demo of multiple output streams via the " & plgdev & " driver."); Put_Line("Running with the second stream as slave to the first."); New_Line; Modified: trunk/examples/ada/xthick14a.adb.cmake =================================================================== --- trunk/examples/ada/xthick14a.adb.cmake 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/ada/xthick14a.adb.cmake 2009-01-06 15:18:53 UTC (rev 9262) @@ -296,7 +296,7 @@ driver := To_Unbounded_String(Get_Device_Name); - Put_Line("Demo of multiple output streams via the " & Get_Device_Name & "driver."); + Put_Line("Demo of multiple output streams via the " & Get_Device_Name & " driver."); Put_Line("Running with the second stream as slave to the first."); New_Line; Modified: trunk/examples/c/x14c.c =================================================================== --- trunk/examples/c/x14c.c 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/c/x14c.c 2009-01-06 15:18:53 UTC (rev 9262) @@ -60,12 +60,15 @@ char driver[80]; + PLINT fam, num, bmax; + /* plplot initialization */ /* Parse and process command line arguments */ (void) plparseopts(&argc, argv, PL_PARSE_FULL); plgdev(driver); + plgfam(&fam,&num,&bmax); printf("Demo of multiple output streams via the %s driver.\n", driver); printf("Running with the second stream as slave to the first.\n"); @@ -88,6 +91,7 @@ plsetopt("geometry", geometry_slave); plspause(0); plsdev(driver); + plsfam(fam,num,bmax); plinit(); /* Set up the data & plot */ Modified: trunk/examples/c++/x14.cc =================================================================== --- trunk/examples/c++/x14.cc 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/c++/x14.cc 2009-01-06 15:18:53 UTC (rev 9262) @@ -107,7 +107,7 @@ cout << "Demo of multiple output streams via the " << driver << " driver." << endl; - cout << "Running with the second stream as slave.\n" << endl; + cout << "Running with the second stream as slave to the first.\n" << endl; // Set up first stream Modified: trunk/examples/f77/x14f.fm4 =================================================================== --- trunk/examples/f77/x14f.fm4 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/f77/x14f.fm4 2009-01-06 15:18:53 UTC (rev 9262) @@ -62,9 +62,9 @@ call plgdev(driver) - write(*,*) 'Demo of multiple output streams via the ', + write(*,'(3A)') 'Demo of multiple output streams via the ', & driver(:lnblnk(driver)), ' driver.' - write(*,*) 'Running with the second stream as slave ', + write(*,'(A)') 'Running with the second stream as slave '// & 'to the first.' write(*,*) Modified: trunk/examples/f95/x14f.f90 =================================================================== --- trunk/examples/f95/x14f.f90 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/f95/x14f.f90 2009-01-06 15:18:53 UTC (rev 9262) @@ -59,9 +59,9 @@ call plgdev(driver) - write(*,*) 'Demo of multiple output streams via the ', & + write(*,'(3A)') 'Demo of multiple output streams via the ', & trim(driver), ' driver.' - write(*,*) 'Running with the second stream as slave ', & + write(*,'(A)') 'Running with the second stream as slave '// & 'to the first.' write(*,*) Modified: trunk/examples/java/x14.java =================================================================== --- trunk/examples/java/x14.java 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/java/x14.java 2009-01-06 15:18:53 UTC (rev 9262) @@ -38,7 +38,8 @@ class x14 { double xscale, yscale, xoff, yoff; - PLStream pls = new PLStream(); + PLStream pls1 = new PLStream(); + PLStream pls2 = new PLStream(); public static void main( String[] args ) { @@ -52,11 +53,11 @@ // Parse and process command line arguments. - pls.parseopts( args, PLStream.PL_PARSE_FULL|PLStream.PL_PARSE_NOPROGRAM ); + pls1.parseopts( args, PLStream.PL_PARSE_FULL|PLStream.PL_PARSE_NOPROGRAM ); StringBuffer driver = new StringBuffer(80); - pls.gdev(driver); + pls1.gdev(driver); String sdriver = new String(driver); System.out.println("Demo of multiple output streams via the " + sdriver + " driver."); System.out.println("Running with the second stream as slave to the first."); @@ -64,47 +65,43 @@ // Set up first stream - pls.setopt("geometry", geometry_master); + pls1.setopt("geometry", geometry_master); - pls.sdev(sdriver); - pls.ssub(2, 2); - pls.init(); + pls1.sdev(sdriver); + pls1.ssub(2, 2); + pls1.init(); // Start next stream - pls.sstrm(1); - // Turn off pause to make this a slave (must follow master) - pls.setopt("geometry", geometry_slave); - pls.spause(false); - pls.sdev(sdriver); - pls.init(); + pls2.setopt("geometry", geometry_slave); + pls2.spause(false); + pls2.sdev(sdriver); + pls2.init(); //Set up the data & plot // Original case - pls.sstrm(0); - xscale = 6.; yscale = 1.; xoff = 0.; yoff = 0.; - plot1(); + plot1(pls1); // Set up the data & plot xscale = 1.; yscale = 1.e+6; - plot1(); + plot1(pls1); // Set up the data & plot xscale = 1.; yscale = 1.e-6; int digmax = 2; - pls.syax(digmax, 0); - plot1(); + pls1.syax(digmax, 0); + plot1(pls1); // Set up the data & plot @@ -112,39 +109,36 @@ yscale = 0.0014; yoff = 0.0185; digmax = 5; - pls.syax(digmax, 0); - plot1(); + pls1.syax(digmax, 0); + plot1(pls1); // To slave // The pleop() ensures the eop indicator gets lit. - pls.sstrm(1); - plot4(); - pls.eop(); + plot4(pls2); + pls2.eop(); // Back to master - pls.sstrm(0); - plot2(); - plot3(); + plot2(pls1); + plot3(pls1); // To slave - pls.sstrm(1); - plot5(); - pls.eop(); + plot5(pls2); + pls2.eop(); // Back to master to wait for user to advance - pls.sstrm(0); - pls.eop(); + pls1.eop(); // Call plend to finish off. - pls.end(); + //pls2.endl(); + pls1.end(); } - void plot1() + void plot1(PLStream pls) { int i; double xmin, xmax, ymin, ymax; @@ -191,7 +185,7 @@ pls.flush(); } - void plot2() + void plot2(PLStream pls) { int i; double x[] = new double[100]; @@ -222,7 +216,7 @@ pls.flush(); } - void plot3() + void plot3(PLStream pls) { int i; int space0[] = {}; @@ -270,7 +264,7 @@ pls.flush(); } - void plot4() + void plot4(PLStream pls) { NumberFormat nf = NumberFormat.getNumberInstance(); @@ -347,7 +341,7 @@ // Transformation function final double tr[] = {XSPA, 0.0, -1.0, 0.0, YSPA, -1.0}; - void plot5() + void plot5(PLStream pls) { int i, j; Modified: trunk/examples/perl/x14.pl =================================================================== --- trunk/examples/perl/x14.pl 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/examples/perl/x14.pl 2009-01-06 15:18:53 UTC (rev 9262) @@ -260,10 +260,9 @@ # Set up viewport and window, but do not draw box plenv (-1.3, 1.3, -1.3, 1.3, 1, -2); - for (my $i = 1; $i <= 10; $i++) { - my $j = sequence (361); - my $x = 0.1 * $i * $x0; - my $y = 0.1 * $i * $y0; + for my $i (1 .. 10) { + my $x = pdl (0.1 * $i * $x0); + my $y = pdl (0.1 * $i * $y0); # Draw circles for polar grid @@ -271,7 +270,7 @@ } plcol0 (2); - for (my $i = 1; $i <= 11; $i++) { + for my $i (0 .. 11) { my $theta = 30 * $i; my $dx = cos ($dtr * $theta); my $dy = sin ($dtr * $theta); @@ -287,14 +286,13 @@ if ($dx >= -0.00001) { plptex ($dx, $dy, $dx, $dy, -0.15, $text); } else { - plptex($dx, $dy, -$dx, -$dy, 1.15, $text); + plptex ($dx, $dy, -$dx, -$dy, 1.15, $text); } } # Draw the graph - $i = sequence (361); - my $r = sin ($dtr * (5 * $i)); + my $r = sin ($dtr * 5 * sequence(361)); $x = $x0 * $r; $y = $y0 * $r; @@ -331,9 +329,9 @@ my $mark = 1500; my $space = 1500; - my $xx = ((sequence (XPTS) - (XPTS / 2)) / (XPTS / 2))->dummy (1, YPTS); - my $yy = ((sequence (YPTS) - (YPTS / 2)) - / (YPTS / 2) - 1.0)->dummy (0, XPTS); + my $xx = ((sequence (XPTS) - int(XPTS / 2)) / int(XPTS / 2))->dummy (1, YPTS); + my $yy = ((sequence (YPTS) - int(YPTS / 2)) + / int(YPTS / 2) - 1.0)->dummy (0, XPTS); my $z = $xx * $xx - $yy * $yy; my $w = 2 * $xx * $yy; Modified: trunk/plplot_test/test_ada.sh.in =================================================================== --- trunk/plplot_test/test_ada.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_ada.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -27,21 +27,27 @@ # pushd $adadir; make; popd # Do the standard non-interactive examples. -# Skip 14 because it requires two output files. # Skip 17 because it is interactive. lang="a" for index in \ 01 02 03 04 05 06 07 08 09 \ -10 11 12 13 15 16 18 19 20 \ +10 11 12 13 14 15 16 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31 \ thick01 thick02 thick03 thick04 thick05 thick06 thick07 thick08 thick09 \ -thick10 thick11 thick12 thick13 thick15 thick16 thick18 thick19 thick20 \ +thick10 thick11 thick12 thick13 thick14 thick15 thick16 thick18 thick19 thick20 \ thick21 thick22 thick23 thick24 thick25 thick26 thick27 thick28 thick29 thick30 thick31; do if [ "$verbose_test" ]; then echo "x${index}" fi - $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" -o "$index" = "thick14" ] ; then + $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + $adadir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_c.sh.in =================================================================== --- trunk/plplot_test/test_c.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_c.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -27,19 +27,27 @@ # pushd $cdir; make; popd # Do the standard non-interactive examples. -# skip 14 because it requires two output files. # skip 17 because it is interactive. lang="c" export index lang -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 \ +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}${lang}" fi + if [ "$index" = "14" ] ; then + $DEBUG_CMD $cdir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + else $DEBUG_CMD $cdir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - # Look for any status codes (segfaults, plexit) from the examples themselves. - status_code=$? + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_cxx.sh.in =================================================================== --- trunk/plplot_test/test_cxx.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_cxx.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -36,14 +36,20 @@ $DEBUG_CMD $cxxdir/x01cc -dev $device -o ${OUTPUT_DIR}/x01cc%n.$dsuffix $options # Do the standard non-interactive examples. -# skip 14 because it requires two output files. # skip 17 because it is interactive. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}" fi - $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}acxx%n.$dsuffix +EOF + status_code=$? + else + $DEBUG_CMD $cxxdir/x${index} -dev $device -o ${OUTPUT_DIR}/x${index}cxx%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_diff.sh.in =================================================================== --- trunk/plplot_test/test_diff.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_diff.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -84,9 +84,8 @@ if [ -f x${xsuffix}01${suffix}.psc ] ; then # Standard non-interactive examples - # Skip example 14 because it requires two output files # Skip example 17 because it is interactive - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 \ + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 14a 15 16 18 19 20 \ 21 22 23 24 25 26 27 28 29 30 31 ; do if [ ! -f x${xsuffix}${index}c.psc ] ; then echo "C example ${index} is missing" @@ -100,13 +99,15 @@ if [ $? != 0 ] ; then different="${different} ${index}" fi - if [ -f x${xsuffix}${index}${suffix}_psc.txt ] ; then - @DIFF_EXECUTABLE@ -q x${xsuffix}${index}c_psc.txt x${xsuffix}${index}${suffix}_psc.txt 2>&1 > /dev/null - if [ $? != 0 ] ; then - diffstdout="${diffstdout} ${index}" + if [ "$index" != "14a" ] ; then + if [ -f x${xsuffix}${index}${suffix}_psc.txt ] ; then + @DIFF_EXECUTABLE@ -q x${xsuffix}${index}c_psc.txt x${xsuffix}${index}${suffix}_psc.txt 2>&1 > /dev/null + if [ $? != 0 ] ; then + diffstdout="${diffstdout} ${index}" + fi + else + missingstdout="${missingstdout} ${index}" fi - else - missingstdout="${missingstdout} ${index}" fi fi fi @@ -116,7 +117,7 @@ echo " Differing postscript output : ${different}" echo " Missing stdout : ${missingstdout}" echo " Differing stdout : ${diffstdout}" - if [ "${different}" != "" ] || [ "${diffstdout}" != "" ] ; then + if [ "${different}" != "" -o "${diffstdout}" != "" ] ; then ret=1 fi fi Modified: trunk/plplot_test/test_f77.sh.in =================================================================== --- trunk/plplot_test/test_f77.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_f77.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -54,13 +54,20 @@ fi # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "${index}" = "14" ] ; then + $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}af%n.$dsuffix +EOF + status_code=$? + else + $DEBUG_CMD $f77dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code @@ -99,16 +106,26 @@ fi # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}f" fi + if [ "$index" = "14" ] ; then $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f%n.$dsuffix +$device +${OUTPUT_DIR}/x${index}af%n.$dsuffix EOF - status_code=$? + status_code=$? + else + $DEBUG_CMD $f77dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt +$device +${OUTPUT_DIR}/x${index}f%n.$dsuffix +EOF + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_f95.sh.in =================================================================== --- trunk/plplot_test/test_f95.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_f95.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -55,13 +55,20 @@ # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}f" fi - $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "${index}" = "14" ] ; then + $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}af95%n.$dsuffix +EOF + status_code=$? + else + $DEBUG_CMD $f95dir/x${index}f -dev $device -o ${OUTPUT_DIR}/x${index}f95%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code @@ -100,16 +107,26 @@ # Do the standard non-interactive examples. -# skip 14 and 17 because they are interactive. - for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +# skip 17 because it is interactive. + for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}f" fi + if [ "${index}" = "14" ] ; then $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt $device ${OUTPUT_DIR}/x${index}f95%n.$dsuffix +$device +${OUTPUT_DIR}/x${index}af95%n.$dsuffix EOF - status_code=$? + status_code=$? + else + $DEBUG_CMD $f95dir/x${index}f <<EOF 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt +$device +${OUTPUT_DIR}/x${index}f95%n.$dsuffix +EOF + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_java.sh.in =================================================================== --- trunk/plplot_test/test_java.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_java.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -31,9 +31,8 @@ # pushd $javadir; make; popd # Do the standard non-interactive examples. -# skip 14 because it requires two output files. -# skip 19 because it is not implemented -# skip 17 because it is interactive and not implemented. +# skip 19 because it is not implemented. +# skip 17 because it is interactive. # # Set up option to point to java bindings jar file and wrapper if needed. lang="j" @@ -43,17 +42,23 @@ if test -z "$PLPLOT_CLASSPATH" ; then PLPLOT_CLASSPATH=@JAVADATA_HARDDIR@/plplot.jar fi +if test "@WIN32@" != "1" ; then + PLPLOT_CLASSPATH=${javadir}:${PLPLOT_CLASSPATH} +fi -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31 ; do if [ "$verbose_test" ]; then echo "x${index}" fi - if test "@WIN32@" = "1"; then + if [ "$index" = "14" ] ; then + java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else java -classpath ${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - else - java -classpath ${javadir}:${PLPLOT_CLASSPATH} ${JAVA_TEST_OPTS} plplot.examples.x${index} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? fi - status_code=$? cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_ocaml.sh.in =================================================================== --- trunk/plplot_test/test_ocaml.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_ocaml.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -24,14 +24,23 @@ # Do the standard non-interactive examples. lang="ocaml" -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}ocaml" fi - $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ - $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - # Look for any status codes (segfaults, plexit) from the examples themselves. - status_code=$? + if [ "$index" = "14" ] ; then + $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + else + $ocamldir/x${index}ocaml -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \ + $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + # Look for any status codes (segfaults, plexit) from the examples themselves. + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_octave.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -71,14 +71,14 @@ closefig endfor #plot equivalent of x??c examples. These only required octave-2.0.x -#For file output 14 and 17 are not suitable, and 19 is not done +#For file output 17 is not suitable, and 19 is not done #(and should probably be dropped anyway since the map stuff is not #in the API that is supposed to be common to all front ends.) failed = []; -for i=[1:13 15 16 18 20:31 ]; +for i=[1:16 18 20:31 ]; ofile = sprintf("${OUTPUT_DIR}/x%.2d${lang}_${dsuffix}.txt",i); strm = fopen(ofile,"w"); - cmd = sprintf("x%.2dc",i); + cmd = sprintf("x%.2dc",i); if (verbose_test) printf("%s\n",cmd); endif @@ -95,8 +95,12 @@ #common examples. file = sprintf("${OUTPUT_DIR}/x%.2d${lang}%%n.$dsuffix",i); plSetOpt("o", file); + if i == 14 + file2 = sprintf("${OUTPUT_DIR}/x%.2da${lang}.${dsuffix}",i); + endif eval(cmd, "failed = [failed, i];"); fclose(strm); + clear file2; endfor if ! isempty (failed) printf ("Failed tests: "); Modified: trunk/plplot_test/test_perl.sh.in =================================================================== --- trunk/plplot_test/test_perl.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_perl.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -26,7 +26,6 @@ # pushd $cdir; make; popd # Do the standard non-interactive examples. -# skip 14 because it requires two output files. # skip 17 because it is interactive. # Ensure correct version of the libraries are picked up in both the build @@ -39,19 +38,26 @@ fi if [ "@HAVE_PDL_GRAPHICS_PLPLOT_40@" = "ON" ] ; then - INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31" + INDEX_LIST="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31" else # Examples 02, 20, 21, 23, 24, 28, 29, and 30 require PDL::Graphics::PLplot # version 0.46 or later. - INDEX_LIST="01 03 04 05 06 07 08 09 10 11 12 13 15 16 18 19 22 25 26 27" + INDEX_LIST="01 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 19 22 25 26 27" fi for index in $INDEX_LIST ; do if [ "$verbose_test" ]; then echo "x${index}.pl" fi - $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + $perldir/x${index}.pl -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_python.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -26,19 +26,25 @@ # $pythondir must be the build tree and not the source tree (if separate from # build tree) since must access plplot_python_start.py in build tree and # paths in that file are relative to build tree. -# Skip 14 and 17 because they are interactive. +# Skip 17 because it is interactive and not currently implemented. # Skip 19 because it is just a placeholder without a real implementation. -# Skip 20 because it is not (yet) implemented. # Skip 21 if using Numeric - it doesn't work # For 24 you need special fonts installed to get good result. lang="p" -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 \ +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 \ 20 22 23 24 25 26 27 28 29 30 31 @NUMPY_EXAMPLES@ ; do if [ "$verbose_test" ]; then echo "x${index}" fi - @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt << EOF +${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + @PYTHON_EXECUTABLE@ $pythondir/x$index -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code Modified: trunk/plplot_test/test_tcl.sh.in =================================================================== --- trunk/plplot_test/test_tcl.sh.in 2009-01-06 10:35:23 UTC (rev 9261) +++ trunk/plplot_test/test_tcl.sh.in 2009-01-06 15:18:53 UTC (rev 9262) @@ -71,16 +71,22 @@ if test -n "$is_error"; then exit 1 fi -# Skip 14th example because requires two output files. # Skip 17th example because it is not implemented (and if it was, it # would be interactive only). # Other examples are not yet implemented. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 18 20 21 22 23 24 25 26 27 28 29 30 31; do if [ "$verbose_test" ]; then echo "x${index}" fi - ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${results}/x${index}${lang}_${dsuffix}.txt - status_code=$? + if [ "$index" = "14" ] ; then + ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${results}/x${index}${lang}_${dsuffix}.txt << EOF +${results}/x${index}a${lang}%n.$dsuffix +EOF + status_code=$? + else + ./x${index} -dev $device -o $results/x${index}${lang}%n.$dsuffix $options 2> test.error >| ${results}/x${index}${lang}_${dsuffix}.txt + status_code=$? + fi cat test.error if [ "$status_code" -ne 0 ]; then exit $status_code This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |