Skip to content

Commit

Permalink
Add version.sql test
Browse files Browse the repository at this point in the history
Current version check was moved from init.sql into version.sql because
init.sql it is not executed with the 'test' target.
  • Loading branch information
vitcpp committed Nov 22, 2023
1 parent f229b2e commit 902ba8d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DATA_built = $(RELEASE_SQL) \
pg_sphere--1.3.1--1.4.0.sql

DOCS = README.pg_sphere COPYRIGHT.pg_sphere
TESTS = tables points euler circle line ellipse poly path box \
TESTS = version tables points euler circle line ellipse poly path box \
index contains_ops contains_ops_compat bounding_box_gist gnomo \
epochprop contains overlaps spoint_brin sbox_brin selectivity
REGRESS = init $(TESTS)
Expand Down
9 changes: 1 addition & 8 deletions expected/init.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
--
-- first, define the datatype. Turn off echoing so that expected file
-- does not depend on contents of pg_sphere.sql.
-- Initialize the extension.
--
CREATE EXTENSION pg_sphere;
select pg_sphere_version();
pg_sphere_version
-------------------
1.4.0
(1 row)

7 changes: 7 additions & 0 deletions expected/version.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Check current pgsphere version
SELECT pg_sphere_version();
pg_sphere_version
-------------------
1.4.0
(1 row)

5 changes: 1 addition & 4 deletions sql/init.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
--
-- first, define the datatype. Turn off echoing so that expected file
-- does not depend on contents of pg_sphere.sql.
-- Initialize the extension.
--
CREATE EXTENSION pg_sphere;

select pg_sphere_version();
3 changes: 3 additions & 0 deletions sql/version.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Check current pgsphere version
SELECT pg_sphere_version();

0 comments on commit 902ba8d

Please sign in to comment.