aboutsummaryrefslogtreecommitdiff
path: root/test/cli
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-03-13 16:48:21 +0100
committerEven Rouault <even.rouault@spatialys.com>2021-03-15 16:16:32 +0100
commiteda2311513a67d274d67f5ae8fb3042d78fe3b96 (patch)
treeb62511fa59b64b094eadc5f44b47997f2ee90c42 /test/cli
parent80ef9cee87be3df8eb293e53a91992d6c19178bb (diff)
downloadPROJ-eda2311513a67d274d67f5ae8fb3042d78fe3b96.tar.gz
PROJ-eda2311513a67d274d67f5ae8fb3042d78fe3b96.zip
projinfo: add a --dump-db-structure switch
Diffstat (limited to 'test/cli')
-rwxr-xr-xtest/cli/testprojinfo8
-rw-r--r--test/cli/testprojinfo_out.dist13
2 files changed, 21 insertions, 0 deletions
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index a91c307a..adbebeec 100755
--- a/test/cli/testprojinfo
+++ b/test/cli/testprojinfo
@@ -288,6 +288,14 @@ echo 'Testing NKG: -s EPSG:7789 -t EPSG:4936 --area EPSG:1080 --summary --hide-
$EXE -s EPSG:7789 -t EPSG:4936 --area EPSG:1080 --summary --hide-ballpark >>${OUT} 2>&1
echo "" >>${OUT}
+echo "Testing projinfo --dump-db-structure | head -n 5" >> ${OUT}
+$EXE --dump-db-structure | head -n 5 >>${OUT}
+echo "" >>${OUT}
+
+echo "Testing projinfo --dump-db-structure --output-id HOBU:XXXX EPSG:4326 | tail -n 4" >> ${OUT}
+$EXE --dump-db-structure --output-id HOBU:XXXX EPSG:4326 | tail -n 4 >>${OUT}
+echo "" >>${OUT}
+
# do 'diff' with distribution results
echo "diff ${OUT} with testprojinfo_out.dist"
diff -u ${OUT} ${TEST_CLI_DIR}/testprojinfo_out.dist
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 89c9dbcd..d4ee5774 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -1546,3 +1546,16 @@ Candidate operations found: 1
Note: using '--spatial-test intersects' would bring more results (2)
NKG:ITRF2014_TO_DK, ITRF2014 to ETRS89(DK), 0.01 m, Denmark - onshore and offshore.
+Testing projinfo --dump-db-structure | head -n 5
+CREATE TABLE metadata(
+ key TEXT NOT NULL PRIMARY KEY CHECK (length(key) >= 1),
+ value TEXT NOT NULL
+);
+CREATE TABLE unit_of_measure(
+
+Testing projinfo --dump-db-structure --output-id HOBU:XXXX EPSG:4326 | tail -n 4
+INSERT INTO metadata VALUES('DATABASE.LAYOUT.VERSION.MAJOR',1);
+INSERT INTO metadata VALUES('DATABASE.LAYOUT.VERSION.MINOR',0);
+INSERT INTO geodetic_crs VALUES('HOBU','XXXX','WGS 84','','geographic 2D','EPSG','6422','EPSG','6326',NULL,0);
+INSERT INTO usage VALUES('HOBU','USAGE_GEODETIC_CRS_XXXX','geodetic_crs','HOBU','XXXX','EPSG','1262','EPSG','1183');
+