Add a silly test to the extension

This commit is contained in:
Rafa de la Torre
2015-10-23 14:15:32 +02:00
parent d6e1fb42ae
commit 491eac38ad
4 changed files with 23 additions and 0 deletions

1
geocoder/admin0/extension/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
results/

View File

@@ -1,5 +1,6 @@
EXTENSION = cdb_geocoder_admin0
DATA = cdb_geocoder_admin0--0.0.1.sql
REGRESS = cdb_geocoder_admin0_test
# postgres build stuff
PG_CONFIG = pg_config

View File

@@ -0,0 +1,13 @@
CREATE EXTENSION postgis;
CREATE EXTENSION schema_triggers;
CREATE EXTENSION plpythonu;
CREATE EXTENSION cartodb;
CREATE EXTENSION cdb_geocoder_admin0;
-- Check that the synonym function is callable, should return NULL
SELECT (admin0_synonym_lookup(Array['United States', 'ESP'])).*;
q | adm0_a3
---------------+---------
United States |
ESP |
(2 rows)

View File

@@ -0,0 +1,8 @@
CREATE EXTENSION postgis;
CREATE EXTENSION schema_triggers;
CREATE EXTENSION plpythonu;
CREATE EXTENSION cartodb;
CREATE EXTENSION cdb_geocoder_admin0;
-- Check that the synonym function is callable, should return NULL
SELECT (admin0_synonym_lookup(Array['United States', 'ESP'])).*;