1#!/bin/sh 2 3if test "x$srcdir" = x ; then srcdir=`pwd`; fi 4. ../test_common.sh 5 6 7# This shell script runs the backward compatibility tests. 8 9set -e 10 11echo "" 12echo "*** Testing that this version can read data produced by old versions of netCDF." 13echo "*** checking ref_nc_test_netcdf4_4_0.nc..." 14${NCDUMP} $srcdir/ref_nc_test_netcdf4_4_0.nc > tst_nc_test_netcdf4_4_0.cdl 15# Why drop the first two lines? 16#tail -n +2 < $srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl 17#tail -n +2 < tst_nc_test_netcdf4_4_0.cdl > tmp_4_0.cdl 18#diff -b -w tmp.cdl tmp_4_0.cdl 19diff -b -w $srcdir/ref_nc_test_netcdf4.cdl tst_nc_test_netcdf4_4_0.cdl 20 21# echo "*** Testing that old versions can read data produced by this version of netCDF." 22# echo "*** checking version 4.0..." 23# ${NCGEN} -b -o tst_nc_test_netcdf4 -k nc7 $srcdir/ref_nc_test_netcdf4.cdl 24# /machine/local_4.0/bin/ncdump tst_nc_test_netcdf4.nc > tst_nc_test_netcdf4.cdl 25# tail -n +2 <$srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl 26# tail -n +2 <tst_nc_test_netcdf4.cdl > tmp_4_0.cdl 27# diff -b -w tmp.cdl tmp_4_0.cdl 28 29# echo "*** checking version 4.1.1..." 30# ${NCGEN} -b -o tst_nc_test_netcdf4 -k nc7 $srcdir/ref_nc_test_netcdf4.cdl 31# /machine/local_4.1.1/bin/ncdump tst_nc_test_netcdf4.nc > tst_nc_test_netcdf4.cdl 32# tail -n +2 <$srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl 33# tail -n +2 <tst_nc_test_netcdf4.cdl > tmp_4_0.cdl 34# diff -b -w tmp.cdl tmp_4_0.cdl 35 36echo "*** All backward compatibility tests passed!" 37exit 0 38