2013-12-23 03:53:20 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# This shell script tests the output several previous tests.
|
|
|
|
# $Id: tst_output.sh,v 1.17 2010/05/14 16:21:15 ed Exp $
|
|
|
|
|
2017-03-09 08:01:10 +08:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
|
|
. ../test_common.sh
|
2013-12-23 03:53:20 +08:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "*** Testing extended file format output."
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Figure our dst server
|
2017-03-09 08:01:10 +08:00
|
|
|
DTS=`./findtestserver dap2 dts`
|
2014-10-05 05:59:16 +08:00
|
|
|
if test "x$DTS" = "x" ; then
|
2020-01-01 06:42:58 +08:00
|
|
|
echo "WARNING: cannot locate test server for dts"
|
2013-12-23 03:53:20 +08:00
|
|
|
exit
|
|
|
|
fi
|
2014-10-05 05:59:16 +08:00
|
|
|
URL="$DTS/test.03"
|
2013-12-23 03:53:20 +08:00
|
|
|
|
|
|
|
ECODE=0
|
|
|
|
echo "Test extended format output for a DAP2 file"
|
2017-11-18 01:49:06 +08:00
|
|
|
rm -f tmp_tst_formatx
|
|
|
|
${NCDUMP} -K "${URL}" >tmp_tst_formatx
|
|
|
|
if ! grep 'DAP2 mode=00000000' <tmp_tst_formatx ; then
|
2013-12-23 03:53:20 +08:00
|
|
|
echo "*** Fail: extended format for a DAP2 file"
|
|
|
|
ECODE=1
|
|
|
|
fi
|
|
|
|
|
2017-11-18 01:49:06 +08:00
|
|
|
rm tmp_tst_formatx
|
2013-12-23 03:53:20 +08:00
|
|
|
|
|
|
|
exit $ECODE
|