From: Paul Ramsey Date: Fri, 18 Mar 2011 18:30:23 +0000 (+0000) Subject: Jeff Adams: Added dumping tests for -G versions of loader regress tests. X-Git-Tag: 2.0.0alpha1~1872 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66501d2ca80cd6bc3d5b7db6f9e4c38244efd4ae;p=postgis Jeff Adams: Added dumping tests for -G versions of loader regress tests. git-svn-id: http://svn.osgeo.org/postgis/trunk@6930 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/loader/Arc-G.shp.expected b/regress/loader/Arc-G.shp.expected new file mode 100644 index 000000000..db615cf1d Binary files /dev/null and b/regress/loader/Arc-G.shp.expected differ diff --git a/regress/loader/ArcM-G.shp.expected b/regress/loader/ArcM-G.shp.expected new file mode 100644 index 000000000..673dc421b Binary files /dev/null and b/regress/loader/ArcM-G.shp.expected differ diff --git a/regress/loader/ArcZ-G.shp.expected b/regress/loader/ArcZ-G.shp.expected new file mode 100644 index 000000000..ed061a29a Binary files /dev/null and b/regress/loader/ArcZ-G.shp.expected differ diff --git a/regress/loader/MultiPoint-G.shp.expected b/regress/loader/MultiPoint-G.shp.expected new file mode 100644 index 000000000..b8b586771 Binary files /dev/null and b/regress/loader/MultiPoint-G.shp.expected differ diff --git a/regress/loader/MultiPointM-G.shp.expected b/regress/loader/MultiPointM-G.shp.expected new file mode 100644 index 000000000..4d7d5e3ec Binary files /dev/null and b/regress/loader/MultiPointM-G.shp.expected differ diff --git a/regress/loader/MultiPointZ-G.shp.expected b/regress/loader/MultiPointZ-G.shp.expected new file mode 100644 index 000000000..6ba2d7fdb Binary files /dev/null and b/regress/loader/MultiPointZ-G.shp.expected differ diff --git a/regress/loader/Point-G.shp.expected b/regress/loader/Point-G.shp.expected new file mode 100644 index 000000000..51d38e75d Binary files /dev/null and b/regress/loader/Point-G.shp.expected differ diff --git a/regress/loader/PointM-G.shp.expected b/regress/loader/PointM-G.shp.expected new file mode 100644 index 000000000..03da6b486 Binary files /dev/null and b/regress/loader/PointM-G.shp.expected differ diff --git a/regress/loader/PointZ-G.shp.expected b/regress/loader/PointZ-G.shp.expected new file mode 100644 index 000000000..9b9ab796b Binary files /dev/null and b/regress/loader/PointZ-G.shp.expected differ diff --git a/regress/loader/Polygon-G.shp.expected b/regress/loader/Polygon-G.shp.expected new file mode 100644 index 000000000..997b43fbe Binary files /dev/null and b/regress/loader/Polygon-G.shp.expected differ diff --git a/regress/loader/PolygonM-G.shp.expected b/regress/loader/PolygonM-G.shp.expected new file mode 100644 index 000000000..4513ab799 Binary files /dev/null and b/regress/loader/PolygonM-G.shp.expected differ diff --git a/regress/loader/PolygonZ-G.shp.expected b/regress/loader/PolygonZ-G.shp.expected new file mode 100644 index 000000000..be7e41faa Binary files /dev/null and b/regress/loader/PolygonZ-G.shp.expected differ diff --git a/regress/run_test b/regress/run_test index 2b4e4c817..f0ea44385 100755 --- a/regress/run_test +++ b/regress/run_test @@ -280,6 +280,7 @@ run_loader_and_check_output() # # $1 - Description of this run of the dumper, used for error messages. # $2 - Table name to dump from. +# $3 - "Expected" .shp file to compare with. # $3 - If you pass true, this will run the loader even if neither # of the expected results files exists (though of course # the results won't be compared with anything). @@ -288,8 +289,8 @@ run_dumper_and_check_output() { _description=$1 _tblname=$2 - _run_always=$3 - _expected_shp_file="${TEST}.shp.expected" + _expected_shp_file=$3 + _run_always=$4 if [ -n "$_run_always" -o -r "$_expected_shp_file" ]; then show_progress @@ -337,6 +338,7 @@ run_loader_test () else return 1 fi + # If we have some expected files to compare with, run in geography mode. if run_loader_and_check_output "geog test" "loadedshp" "${TEST}-G.sql.expected" "${TEST}-G.select.expected" \ "-G $_custom_opts"; then @@ -344,6 +346,13 @@ run_loader_test () else return 1 fi + # If we have some expected files to compare with, run the dumper and compare shape files. + if run_dumper_and_check_output "dumper geog test" "loadedshp" "${TEST}-G.shp.expected"; then + : + else + return 1 + fi + # Always run in wkb ("normal") mode, even if there are no expected files to compare with. if run_loader_and_check_output "wkb test" "loadedshp" "${TEST}.sql.expected" "${TEST}.select.expected" \ "$_custom_opts" "true"; then @@ -351,6 +360,13 @@ run_loader_test () else return 1 fi + # If we have some expected files to compare with, run the dumper and compare shape files. + if run_dumper_and_check_output "dumper wkb test" "loadedshp" "${TEST}.shp.expected"; then + : + else + return 1 + fi + # Some custom parameters can be incompatible with -D. if [ -z "$_custom_opts" ]; then # If we have some expected files to compare with, run in wkt dump mode. @@ -375,12 +391,6 @@ run_loader_test () return 1 fi fi - # If we have some expected files to compare with, run the dumper and compare shape files. - if run_dumper_and_check_output "dumper test" "loadedshp"; then - : - else - return 1 - fi return 0 }