aboutsummaryrefslogtreecommitdiff
path: root/test/cli/testcct
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-02-12 20:45:37 +0100
committerKristian Evers <kristianevers@gmail.com>2019-02-12 20:45:37 +0100
commitee00f2c8fca0a55c5ff20c9f0490ddda753ea3b1 (patch)
tree401852d2777285e926fd14489f84e075abee0059 /test/cli/testcct
parent54df6833b2f7f1907e16ada7c52f136da2668dbb (diff)
parent06236ecbbae7c8cc8c9688573d1ee33b53c833b0 (diff)
downloadPROJ-ee00f2c8fca0a55c5ff20c9f0490ddda753ea3b1.tar.gz
PROJ-ee00f2c8fca0a55c5ff20c9f0490ddda753ea3b1.zip
Merge remote-tracking branch 'osgeo/master' into pipestack
Diffstat (limited to 'test/cli/testcct')
-rwxr-xr-xtest/cli/testcct51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/cli/testcct b/test/cli/testcct
new file mode 100755
index 00000000..93749052
--- /dev/null
+++ b/test/cli/testcct
@@ -0,0 +1,51 @@
+:
+# Test cct
+
+TEST_CLI_DIR=`dirname $0`
+DATA_DIR=`dirname $0`/../../data
+EXE=$1
+
+usage()
+{
+ echo "Usage: ${0} <path to 'cct' program>"
+ echo
+ exit 1
+}
+
+if test -z "${EXE}"; then
+ EXE=../../src/cct
+fi
+
+if test ! -x ${EXE}; then
+ echo "*** ERROR: Can not find '${EXE}' program!"
+ exit 1
+fi
+
+echo "============================================"
+echo "Running ${0} using ${EXE}:"
+echo "============================================"
+
+OUT=testcct_out
+
+rm -f ${OUT}
+
+echo "Testing cct -d 8 +proj=merc +R=1" >> ${OUT}
+echo "90 45" 0 | $EXE -d 8 +proj=merc +R=1 >>${OUT}
+echo "" >>${OUT}
+
+# do 'diff' with distribution results
+echo "diff ${OUT} with testcct_out.dist"
+diff -u ${OUT} ${TEST_CLI_DIR}/testcct_out.dist
+if [ $? -ne 0 ] ; then
+ echo ""
+ echo "PROBLEMS HAVE OCCURRED"
+ echo "test file ${OUT} saved"
+ echo
+ exit 100
+else
+ echo "TEST OK"
+ echo "test file ${OUT} removed"
+ echo
+ /bin/rm -f ${OUT}
+ exit 0
+fi