diff options
| author | Even Rouault <even.rouault@mines-paris.org> | 2018-12-03 17:20:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-03 17:20:48 +0100 |
| commit | d0506e19a71888f7f0c3aa8618d919624e754c4d (patch) | |
| tree | 4468cd5ef29f3f7f6ce2ed950b5d1938cfbf84b5 /test/cli/testprojinfo | |
| parent | 4794d755a8dea4f4501c61e896e1829bb720e69a (diff) | |
| parent | ba111ac8323ff194039a06db87d1fb17ed8175b3 (diff) | |
| download | PROJ-d0506e19a71888f7f0c3aa8618d919624e754c4d.tar.gz PROJ-d0506e19a71888f7f0c3aa8618d919624e754c4d.zip | |
Merge pull request #1182 from rouault/plug_new_code
Remove data/epsg, IGNF and esri.* files / support legacy +init=epsg:XXXX syntax
Diffstat (limited to 'test/cli/testprojinfo')
| -rwxr-xr-x | test/cli/testprojinfo | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo new file mode 100755 index 00000000..ad62d1da --- /dev/null +++ b/test/cli/testprojinfo @@ -0,0 +1,67 @@ +: +# Test projinfo + +TEST_CLI_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data +EXE=$1 + +usage() +{ + echo "Usage: ${0} <path to 'projinfo' program>" + echo + exit 1 +} + +if test -z "${EXE}"; then + EXE=../../src/projinfo +fi + +if test ! -x ${EXE}; then + echo "*** ERROR: Can not find '${EXE}' program!" + exit 1 +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + +OUT=testprojinfo_out + +rm -f ${OUT} + +echo "Testing projinfo EPSG:4326" >> ${OUT} +$EXE EPSG:4326 >>${OUT} +echo "" >>${OUT} + +echo "Testing projinfo -o ALL EPSG:4326" >> ${OUT} +$EXE -o ALL EPSG:4326 >>${OUT} +echo "" >>${OUT} + +echo "Testing projinfo -s EPSG:4326 -t EPSG:32631" >> ${OUT} +$EXE -s EPSG:4326 -t EPSG:32631 >>${OUT} +echo "" >>${OUT} + +echo "Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary" >> ${OUT} +$EXE -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary >>${OUT} +echo "" >>${OUT} + +echo "Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects" >> ${OUT} +$EXE -s NAD27 -t NAD83 --grid-check none --spatial-test intersects >>${OUT} +echo "" >>${OUT} + +# do 'diff' with distribution results +echo "diff ${OUT} with testprojinfo_out.dist" +diff -u ${OUT} ${TEST_CLI_DIR}/testprojinfo_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 |
