aboutsummaryrefslogtreecommitdiff
path: root/test/old/testflaky
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-09-18 21:37:20 +0200
committerEven Rouault <even.rouault@spatialys.com>2018-09-18 22:58:57 +0200
commiteb2862c80971f106c69bfb46e8324104634fe1f2 (patch)
tree48936a83bc069717a87398a39727ef18d064e972 /test/old/testflaky
parentd7366ffdd5cbe5ba6c2d9f917d064085bbc3eddc (diff)
downloadPROJ-eb2862c80971f106c69bfb46e8324104634fe1f2.tar.gz
PROJ-eb2862c80971f106c69bfb46e8324104634fe1f2.zip
Move data/test* scripts and expected results to test/old/
Diffstat (limited to 'test/old/testflaky')
-rwxr-xr-xtest/old/testflaky75
1 files changed, 75 insertions, 0 deletions
diff --git a/test/old/testflaky b/test/old/testflaky
new file mode 100755
index 00000000..ccb9dfd5
--- /dev/null
+++ b/test/old/testflaky
@@ -0,0 +1,75 @@
+:
+# Script to do some testing of flaky transformation that do not depend
+# on datum files.
+#
+#
+TEST_OLD_DIR=`dirname $0`
+DATA_DIR=`dirname $0`/../../data
+EXE=$1
+
+usage()
+{
+ echo "Usage: ${0} <path to 'cs2cs' program>"
+ echo
+ exit 1
+}
+
+if test -z "${EXE}"; then
+ EXE=../../src/cs2cs
+fi
+
+if test ! -x ${EXE}; then
+ echo "*** ERROR: Can not find '${EXE}' program!"
+ exit 1
+fi
+
+echo "============================================"
+echo "Running ${0} using ${EXE}:"
+echo "============================================"
+
+OUT=tf_out
+#EXE=../src/cs2cs
+#
+echo "doing tests into file ${OUT}, please wait"
+rm -f ${OUT}
+#
+echo "Test healpix inverse projection on sphere" >> ${OUT}
+$EXE +proj=latlong +a=1 +lon_0=0 \
+ +to +proj=healpix +a=1 +lon_0=0 -f '%.'5'f' -I\
+ -E >>${OUT} <<EOF
+0 0.7853981633974483
+-1.5707963267948966 0
+EOF
+$EXE +proj=latlong +a=5 \
+ +to +proj=healpix +a=5 -f '%.'5'f' -I\
+ -E >>${OUT} <<EOF
+0.0 0.0
+0.0 3.9269908169872414
+0.0 -3.9269908169872414
+7.853981633974483 0.0
+-7.853981633974483 0.0
+-15.707963267948966 0.0
+-11.780972450961723 7.853981633974483
+-11.780972450961723 -7.853981633974483
+1.437378399445537 5.364369216432778
+1.437378399445537 -5.364369216432778
+EOF
+
+##############################################################################
+# Done!
+# do 'diff' with distribution results
+echo "diff ${OUT} with ${OUT}.dist"
+diff -b ${OUT} ${TEST_OLD_DIR}/${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