From 8c45923794f45f25257897742a6adaa2bcd7c887 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Sat, 7 Jan 2012 00:47:36 +0000 Subject: [PATCH] Move geojson test into geojson.sql file git-svn-id: http://svn.osgeo.org/postgis/trunk@8692 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/in_geojson.sql | 4 ++++ regress/in_geojson_expected | 3 +++ regress/tickets.sql | 5 ----- regress/tickets_expected | 3 --- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/regress/in_geojson.sql b/regress/in_geojson.sql index f38efda7b..e77ad32af 100644 --- a/regress/in_geojson.sql +++ b/regress/in_geojson.sql @@ -6,3 +6,7 @@ select 'geomfromgeojson_04',st_astext(st_geomfromgeojson(st_asgeojson('LINESTRIN select 'geomfromgeojson_05',st_astext(st_geomfromgeojson(st_asgeojson('POLYGON((0 0,1 1,1 0,0 0))'))); select 'geomfromgeojson_06',st_astext(st_geomfromgeojson(st_asgeojson('MULTIPOLYGON(((0 0,1 1,1 0,0 0)))'))); +-- #1434 +select '#1434: Next two errors'; +select '#1434.1',ST_GeomFromGeoJSON('{ "type": "Point", "crashme": [100.0, 0.0] }'); +select '#1434.2',ST_GeomFromGeoJSON('crashme');; diff --git a/regress/in_geojson_expected b/regress/in_geojson_expected index d310e655d..8e218c78a 100644 --- a/regress/in_geojson_expected +++ b/regress/in_geojson_expected @@ -4,3 +4,6 @@ geomfromgeojson_03|POINT(1 1) geomfromgeojson_04|LINESTRING(0 0,1 1) geomfromgeojson_05|POLYGON((0 0,1 1,1 0,0 0)) geomfromgeojson_06|MULTIPOLYGON(((0 0,1 1,1 0,0 0))) +#1434: Next two errors +ERROR: Unable to find 'coordinates' in GeoJSON string +ERROR: unexpected character (at offset 0) diff --git a/regress/tickets.sql b/regress/tickets.sql index 8f5f19fca..69d29b065 100644 --- a/regress/tickets.sql +++ b/regress/tickets.sql @@ -480,11 +480,6 @@ WITH pts AS ( SELECT 'POINT(0 45)'::geography AS s, 'POINT(45 45)'::geography AS SELECT '#1305.2',abs(ST_Distance(e, ST_Project(s, ST_Distance(s, e), ST_Azimuth(s, e)))) < 0.001 FROM pts; SELECT '#1305.3',ST_Azimuth('POINT(0 45)'::geography, 'POINT(0 45)'::geography) IS NULL; --- #1434 -select '#1434: Next two errors'; -select '#1434.1',ST_GeomFromGeoJSON('{ "type": "Point", "crashme": [100.0, 0.0] }'); -select '#1434.2',ST_GeomFromGeoJSON('crashme');; - -- Clean up DELETE FROM spatial_ref_sys; diff --git a/regress/tickets_expected b/regress/tickets_expected index 7828c75df..de8ef7fd0 100644 --- a/regress/tickets_expected +++ b/regress/tickets_expected @@ -149,6 +149,3 @@ ERROR: Geometry type (Polygon) does not match column type (MultiPolygon) #1305.1|POINT(10 10) #1305.2|t #1305.3|t -#1434: Next two errors -ERROR: Unable to find 'coordinates' in GeoJSON string -ERROR: unexpected character (at offset 0) -- 2.40.0