]> granicus.if.org Git - postgis/commitdiff
Jeff Adams: Added dumping tests for -G versions of loader regress tests.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 18 Mar 2011 18:30:23 +0000 (18:30 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 18 Mar 2011 18:30:23 +0000 (18:30 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6930 b70326c6-7e19-0410-871a-916f4a2858ee

13 files changed:
regress/loader/Arc-G.shp.expected [new file with mode: 0644]
regress/loader/ArcM-G.shp.expected [new file with mode: 0644]
regress/loader/ArcZ-G.shp.expected [new file with mode: 0644]
regress/loader/MultiPoint-G.shp.expected [new file with mode: 0644]
regress/loader/MultiPointM-G.shp.expected [new file with mode: 0644]
regress/loader/MultiPointZ-G.shp.expected [new file with mode: 0644]
regress/loader/Point-G.shp.expected [new file with mode: 0644]
regress/loader/PointM-G.shp.expected [new file with mode: 0644]
regress/loader/PointZ-G.shp.expected [new file with mode: 0644]
regress/loader/Polygon-G.shp.expected [new file with mode: 0644]
regress/loader/PolygonM-G.shp.expected [new file with mode: 0644]
regress/loader/PolygonZ-G.shp.expected [new file with mode: 0644]
regress/run_test

diff --git a/regress/loader/Arc-G.shp.expected b/regress/loader/Arc-G.shp.expected
new file mode 100644 (file)
index 0000000..db615cf
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 (file)
index 0000000..673dc42
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 (file)
index 0000000..ed061a2
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 (file)
index 0000000..b8b5867
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 (file)
index 0000000..4d7d5e3
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 (file)
index 0000000..6ba2d7f
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 (file)
index 0000000..51d38e7
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 (file)
index 0000000..03da6b4
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 (file)
index 0000000..9b9ab79
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 (file)
index 0000000..997b43f
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 (file)
index 0000000..4513ab7
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 (file)
index 0000000..be7e41f
Binary files /dev/null and b/regress/loader/PolygonZ-G.shp.expected differ
index 2b4e4c817ae6401e03e6a0fc4082e4496f9bcabc..f0ea443852db6053da50ca462d6e41eddab19987 100755 (executable)
@@ -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
 }