diff --git a/vector/v.what.rast3/test_suite/random_points.txt b/vector/v.what.rast3/test_suite/random_points.txt deleted file mode 100644 index b40d4ba9d55..00000000000 --- a/vector/v.what.rast3/test_suite/random_points.txt +++ /dev/null @@ -1,40 +0,0 @@ -ORGANIZATION: -DIGIT DATE: -DIGIT NAME: soeren -MAP NAME: -MAP DATE: Sun May 13 00:35:59 2012 -MAP SCALE: 1 -OTHER INFO: -ZONE: 0 -MAP THRESH: 0.000000 -VERTI: -P 1 1 - 15.98122828 27.60680488 39.15496119 - 1 1 -P 1 1 - 20.15599665 63.81531506 9.87756846 - 1 2 -P 1 1 - 66.47772443 53.77607164 13.88873554 - 1 3 -P 1 1 - 44.60300442 33.41779363 31.44354624 - 1 4 -P 1 1 - 63.52155272 35.93806371 47.61148626 - 1 5 -P 1 1 - 8.3804932 44.49982096 35.86484647 - 1 6 -P 1 1 - 85.83974446 42.48782134 0.81502858 - 1 7 -P 1 1 - 75.71132294 9.60621038 40.20883771 - 1 8 -P 1 1 - 84.33209107 28.0661076 6.48952234 - 1 9 -P 1 1 - 89.1191198 69.92471626 10.91284527 - 1 10 diff --git a/vector/v.what.rast3/test_suite/random_points.ref b/vector/v.what.rast3/testsuite/data/random_points.ref similarity index 100% rename from vector/v.what.rast3/test_suite/random_points.ref rename to vector/v.what.rast3/testsuite/data/random_points.ref diff --git a/vector/v.what.rast3/test_suite/random_points_db.ref b/vector/v.what.rast3/testsuite/data/random_points_db.ref similarity index 100% rename from vector/v.what.rast3/test_suite/random_points_db.ref rename to vector/v.what.rast3/testsuite/data/random_points_db.ref diff --git a/vector/v.what.rast3/test_suite/test.v.what.rast3.sh b/vector/v.what.rast3/testsuite/test.v.what.rast3.sh similarity index 71% rename from vector/v.what.rast3/test_suite/test.v.what.rast3.sh rename to vector/v.what.rast3/testsuite/test.v.what.rast3.sh index ee52bb45890..2180256a402 100755 --- a/vector/v.what.rast3/test_suite/test.v.what.rast3.sh +++ b/vector/v.what.rast3/testsuite/test.v.what.rast3.sh @@ -11,14 +11,28 @@ r3.mapcalc --o expr="plume = double(col() + row() + depth())" # v.random --o -z seed=1 output=random_points npoints=10 zmin=0 zmax=50 # v.out.ascii --o format=standard input=random_points output=random_points.txt -v.in.ascii --o -z format=standard input=random_points.txt output=random_points +v.in.ascii --o -z format=standard input=data/random_points.ref output=random_points +v.out.ascii --o format=standard input=random_points > data/random_points.txt v.db.addtable --o map=random_points column="concentration double precision" # @test the voxel sampling with vector points v.what.rast3 map=random_points raster3d=plume column=concentration +v.db.select map=random_points > data/random_points_db.txt # Some data export commands for reference data creation and visual validation #v.out.ascii --o format=standard input=random_points output=random_points.ref #v.db.select map=random_points > random_points_db.ref #r3.out.vtk --o input=plume output=plume.vtk null=0 #v.out.vtk --o -n input=random_points output=random_points.vtk + + +cd data + +for i in `ls *.txt` ; do + diff $i "`basename $i .txt`.ref" >> out.diff +done + +CHAR_NUM=`cat out.diff | wc -c` + +# Return as exit status 0 in case no diffs are found +exit $CHAR_NUM