diff --git a/geocoder/admin0/extension/.gitignore b/geocoder/admin0/extension/.gitignore new file mode 100644 index 0000000..fbca225 --- /dev/null +++ b/geocoder/admin0/extension/.gitignore @@ -0,0 +1 @@ +results/ diff --git a/geocoder/admin0/extension/Makefile b/geocoder/admin0/extension/Makefile index 62b397a..cf92715 100644 --- a/geocoder/admin0/extension/Makefile +++ b/geocoder/admin0/extension/Makefile @@ -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 diff --git a/geocoder/admin0/extension/expected/cdb_geocoder_admin0_test.out b/geocoder/admin0/extension/expected/cdb_geocoder_admin0_test.out new file mode 100644 index 0000000..834ab14 --- /dev/null +++ b/geocoder/admin0/extension/expected/cdb_geocoder_admin0_test.out @@ -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) + diff --git a/geocoder/admin0/extension/sql/cdb_geocoder_admin0_test.sql b/geocoder/admin0/extension/sql/cdb_geocoder_admin0_test.sql new file mode 100644 index 0000000..c5fe53f --- /dev/null +++ b/geocoder/admin0/extension/sql/cdb_geocoder_admin0_test.sql @@ -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'])).*;