1#!/bin/sh 2# This shell script runs the ncdump tests. 3# Ed Hartnett, Dennis Heimbigner 4 5if test "x$srcdir" = x ; then srcdir=`pwd`; fi 6. ../test_common.sh 7 8set -e 9echo "" 10echo "*** Testing ncgen and ncdump using some test CDL files." 11echo "*** creating tst_small.nc from ref_tst_small.cdl..." 12${NCGEN} -b -o tst_small.nc $srcdir/ref_tst_small.cdl 13echo "*** creating tst_small.cdl from tst_small.nc..." 14${NCDUMP} tst_small.nc > tst_small.cdl 15diff -b -w tst_small.cdl $srcdir/ref_tst_small.cdl 16 17echo "*** creating test0_ncdump.nc from test0.cdl..." 18${NCGEN} -o test0_ncdump.nc -b $srcdir/test0.cdl 19echo "*** creating test1_ncdump.cdl from test0_ncdump.nc..." 20${NCDUMP} -n test1_ncdump test0_ncdump.nc > test1_ncdump.cdl 21echo "*** creating test1_ncdump.nc from test1_ncdump.cdl..." 22${NCGEN} -b test1_ncdump.cdl 23echo "*** creating test2_ncdump.cdl from test1_ncdump.nc..." 24${NCDUMP} test1_ncdump.nc > test2_ncdump.cdl 25echo "*** checking that test1_ncdump.cdl and test2_ncdump.cdl are the same..." 26diff -b -w test1_ncdump.cdl test2_ncdump.cdl 27 28echo "*** All tests of ncgen and ncdump using test0.cdl passed!" 29exit 0 30