From 66501d2ca80cd6bc3d5b7db6f9e4c38244efd4ae Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Fri, 18 Mar 2011 18:30:23 +0000 Subject: [PATCH] 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 --- regress/loader/Arc-G.shp.expected | Bin 0 -> 400 bytes regress/loader/ArcM-G.shp.expected | Bin 0 -> 348 bytes regress/loader/ArcZ-G.shp.expected | Bin 0 -> 420 bytes regress/loader/MultiPoint-G.shp.expected | Bin 0 -> 196 bytes regress/loader/MultiPointM-G.shp.expected | Bin 0 -> 236 bytes regress/loader/MultiPointZ-G.shp.expected | Bin 0 -> 276 bytes regress/loader/Point-G.shp.expected | Bin 0 -> 184 bytes regress/loader/PointM-G.shp.expected | Bin 0 -> 208 bytes regress/loader/PointZ-G.shp.expected | Bin 0 -> 232 bytes regress/loader/Polygon-G.shp.expected | Bin 0 -> 488 bytes regress/loader/PolygonM-G.shp.expected | Bin 0 -> 664 bytes regress/loader/PolygonZ-G.shp.expected | Bin 0 -> 840 bytes regress/run_test | 26 +++++++++++++++------- 13 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 regress/loader/Arc-G.shp.expected create mode 100644 regress/loader/ArcM-G.shp.expected create mode 100644 regress/loader/ArcZ-G.shp.expected create mode 100644 regress/loader/MultiPoint-G.shp.expected create mode 100644 regress/loader/MultiPointM-G.shp.expected create mode 100644 regress/loader/MultiPointZ-G.shp.expected create mode 100644 regress/loader/Point-G.shp.expected create mode 100644 regress/loader/PointM-G.shp.expected create mode 100644 regress/loader/PointZ-G.shp.expected create mode 100644 regress/loader/Polygon-G.shp.expected create mode 100644 regress/loader/PolygonM-G.shp.expected create mode 100644 regress/loader/PolygonZ-G.shp.expected diff --git a/regress/loader/Arc-G.shp.expected b/regress/loader/Arc-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..db615cf1d7cd318df6d2825d6da8f988cda59f72 GIT binary patch literal 400 zcmZQzQ0HR64o=1*%nqcmL3L#N2dto%pUKovHKTsdS4u~Nl L4yZItABO_~j#&-k literal 0 HcmV?d00001 diff --git a/regress/loader/ArcM-G.shp.expected b/regress/loader/ArcM-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..673dc421b3692c3291e3795f4848d2108fc1bae1 GIT binary patch literal 348 zcmZQzQ0HR64%WS3W?&G>(mDAa#sDTtSRkKr0#8ffxjsfS3i$ z!bZT%htV7k5LGZ*0Lq8aFn7Xe5vV+jhUtURFmu7~2O16IGeGsh)WOV$nIi#}mvI09 Dl&%lO literal 0 HcmV?d00001 diff --git a/regress/loader/ArcZ-G.shp.expected b/regress/loader/ArcZ-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..ed061a29afa8cae5e7c7b3db9d73fab8e1d932b1 GIT binary patch literal 420 zcmZQzQ0HR64lcc5W?)rp8!p}G+vSsD62z^SwJh%0L*+P2Z#iQ{rds_ C4h@h1 literal 0 HcmV?d00001 diff --git a/regress/loader/MultiPointM-G.shp.expected b/regress/loader/MultiPointM-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..4d7d5e3ec13f4ffe07fccd4e0f2bbc0bdfc7be89 GIT binary patch literal 236 zcmZQzQ0HR64$59IGcd?t$bHxk5mIu1&>!p}G#Ysz?f^uD!vRP$0!p}w8;So&ENp055z(F93Va;5Qh+B7SKvG o05f070V086Kh!;F_A@};!N70;q7N#M>Mo!Z*nJ=xq7Enz01%lOiU0rr literal 0 HcmV?d00001 diff --git a/regress/loader/Point-G.shp.expected b/regress/loader/Point-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..51d38e75d0d84b98527aef900b79e814ac0d7b6a GIT binary patch literal 184 zcmZQzQ0HR64q{#~GcYh>$bHxk5mIu1&>!p}G+q*93>Ox&Kzf-_<&+$Nd>{bZ19Snh NJ|zbr9|%6|2LKu+3Nioy literal 0 HcmV?d00001 diff --git a/regress/loader/PointM-G.shp.expected b/regress/loader/PointM-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..03da6b4863dc832854692886df3f3bed8a678c16 GIT binary patch literal 208 zcmZQzQ0HR64l-UaGcbr^$bHxk5mIu1&>!p}G#Ysz?f^uD!vRP$0x=&Jv!HsxYM4;f eC^-Q6KmfCk;{cEYbP=*SN)A9i5J1%c?F0Zcn-8u4 literal 0 HcmV?d00001 diff --git a/regress/loader/PointZ-G.shp.expected b/regress/loader/PointZ-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..9b9ab796b51293059bd072cac98d99b0d345910d GIT binary patch literal 232 zcmZQzQ0HR64oY4yGca&t$bHxk5mIu1&>!p}w8;So&ENp055z(F93Va;5DQ^33#u2Y qhXJgX3019<1CS2{FnbvefVm7DAR6dGWOJ1qfP5f;sfD@;=oSDxaT3M= literal 0 HcmV?d00001 diff --git a/regress/loader/Polygon-G.shp.expected b/regress/loader/Polygon-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..997b43fbeb2263ef74bd704aecc954b149c23f63 GIT binary patch literal 488 zcmZQzQ0HR64!*o#W?*22%c&fIFyXWVlnS25lsCpQ!fP;@q9Hvj? F000LyBU%6e literal 0 HcmV?d00001 diff --git a/regress/loader/PolygonM-G.shp.expected b/regress/loader/PolygonM-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..4513ab79948e9ef91af4f4d1ae10ced4f572c11a GIT binary patch literal 664 zcma)(K?;K~5Jg97LAvQC6bddRhy@p3!5pA>ZjRHXN9fe~Kc%4q4dTno%p{``xt-+a zXztI0$hE}AY}3L72hBe3CEI*S%0{2dKYO*B9IQ}|%6D^TxQ{Ve%%fKsP)81qd+V$t zw}+inv;4Dc@!IQrdO$uoIPR^pj{Le4ZDm`npFSD+9UYwU2;c8gQ)l=DMv#5?S@ywm PJ2>MJ&VFY21jhUVzqmA< literal 0 HcmV?d00001 diff --git a/regress/loader/PolygonZ-G.shp.expected b/regress/loader/PolygonZ-G.shp.expected new file mode 100644 index 0000000000000000000000000000000000000000..be7e41faa3d4817acb0726fc64429d28dfc09821 GIT binary patch literal 840 zcma))K?;K~5JgAYf^<_CE?l?}DON?s`qG))1^n~#Q8s^!9WM~<>}s|mT< znL~CNoy)V1Twk_c%D89V{8Xp&scXz9yNu4|Sx2U4WZj4~&PEj|q@{)b&$AujbHC}c z@5WnU1qw)?{j#4CKKF(G&mGbw*Smf+TDKvdUkOdWhu-dtze>QwdGK Mhh{$$^Z@q$1GIug1^@s6 literal 0 HcmV?d00001 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 } -- 2.50.1