From 6ebb3fc37b5a1b39c3f1d15435d72bfc2cb80d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 19 May 2021 22:57:46 +0300 Subject: [PATCH] better tests and cleaning --- Makefile | 2 +- tests.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f55b893..fe86488 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ clean: .PHONY: clean-tables clean-tables: - for t in $$(./db -c '\dt' | awk '/demo_|integ_/{print $$3}'); do \ + for t in $$(./db -c '\dt' | awk '/demo|integ/{print $$3}'); do \ ./db -c "drop table $$t"; \ done diff --git a/tests.sql b/tests.sql index 2da4adc..19c6a2c 100644 --- a/tests.sql +++ b/tests.sql @@ -26,7 +26,6 @@ insert into figures (name, way) values ('fig6-combi', )) ); insert into figures (name, way) values ('inflection-1',ST_GeomFromText('LINESTRING(110 24,114 20,133 20,145 15,145 0,136 5,123 7,114 7,111 2)')); -insert into figures (name, way) values ('multi-island',ST_GeomFromText('MULTILINESTRING((-10 10,-5 11,0 11,5 11,10 10),(-5 11,-1 15,0 16,1 15,5 11))')); drop table if exists debug; create table debug (i bigint, way geometry); @@ -52,7 +51,9 @@ insert into selfcrossing select name, (self_crossing(ways)).* from inflections; create table demo_selfcrossing3 (name text, i bigint, way geometry); insert into demo_selfcrossing3 select name, generate_subscripts(ways, 1), unnest(ways) from selfcrossing; + -- COMBINED +insert into figures (name, way) values ('multi-island',ST_GeomFromText('MULTILINESTRING((-15 10,-10 10,-5 11,0 11,5 11,10 10,11 9,13 10,15 9),(-5 11,-1 15,0 16,1 15,5 11))')); drop table if exists demo_wm; create table demo_wm (name text, i bigint, way geometry); insert into demo_wm (name, way) select name, ST_SimplifyWM_DEBUG(way) from figures where name='multi-island';