From 311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Tue, 16 Apr 2024 21:46:48 +0200
Subject: Adding upstream version 15.4.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
---
 src/test/regress/sql/path.sql | 44 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 src/test/regress/sql/path.sql

(limited to 'src/test/regress/sql/path.sql')

diff --git a/src/test/regress/sql/path.sql b/src/test/regress/sql/path.sql
new file mode 100644
index 0000000..89f1aa9
--- /dev/null
+++ b/src/test/regress/sql/path.sql
@@ -0,0 +1,44 @@
+--
+-- PATH
+--
+
+--DROP TABLE PATH_TBL;
+
+CREATE TABLE PATH_TBL (f1 path);
+
+INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)]');
+
+INSERT INTO PATH_TBL VALUES (' ( ( 1 , 2 ) , ( 3 , 4 ) ) ');
+
+INSERT INTO PATH_TBL VALUES ('[ (0,0),(3,0),(4,5),(1,6) ]');
+
+INSERT INTO PATH_TBL VALUES ('((1,2) ,(3,4 ))');
+
+INSERT INTO PATH_TBL VALUES ('1,2 ,3,4 ');
+
+INSERT INTO PATH_TBL VALUES (' [1,2,3, 4] ');
+
+INSERT INTO PATH_TBL VALUES ('((10,20))');	-- Only one point
+
+INSERT INTO PATH_TBL VALUES ('[ 11,12,13,14 ]');
+
+INSERT INTO PATH_TBL VALUES ('( 11,12,13,14) ');
+
+-- bad values for parser testing
+INSERT INTO PATH_TBL VALUES ('[]');
+
+INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]');
+
+INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)');
+
+INSERT INTO PATH_TBL VALUES ('(1,2,3,4');
+
+INSERT INTO PATH_TBL VALUES ('(1,2),(3,4)]');
+
+SELECT f1 AS open_path FROM PATH_TBL WHERE isopen(f1);
+
+SELECT f1 AS closed_path FROM PATH_TBL WHERE isclosed(f1);
+
+SELECT pclose(f1) AS closed_path FROM PATH_TBL;
+
+SELECT popen(f1) AS open_path FROM PATH_TBL;
-- 
cgit v1.2.3

