mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
7e582ad3f2
The code for handling character constants in datalists in ncgen has some problems. 1. It failed on large constants 2. It did not handle e.g. var = 'a', 'b', ... in the same way that ncgen3 did. 3. The code for generate.c and genchar.c needed some refactoring to make it a little simpler (but not simple).
32 lines
990 B
Bash
Executable File
32 lines
990 B
Bash
Executable File
#!/bin/sh
|
|
# This shell script runs the ncdump tests.
|
|
# $Id: run_tests.sh,v 1.18 2010/05/19 13:43:39 ed Exp $
|
|
|
|
set -e
|
|
|
|
if test "x$srcdir" = x ; then
|
|
srcdir=`pwd`
|
|
fi
|
|
|
|
echo ""
|
|
echo "*** Testing ncgen and ncdump using some test CDL files."
|
|
echo "*** creating tst_small.nc from ref_tst_small.cdl..."
|
|
../ncgen/ncgen -b -o tst_small.nc $srcdir/ref_tst_small.cdl
|
|
echo "*** creating tst_small.cdl from tst_small.nc..."
|
|
./ncdump tst_small.nc > tst_small.cdl
|
|
diff -b -w tst_small.cdl $srcdir/ref_tst_small.cdl
|
|
|
|
echo "*** creating test0.nc from test0.cdl..."
|
|
../ncgen/ncgen -b $srcdir/test0.cdl
|
|
echo "*** creating test1.cdl from test0.nc..."
|
|
./ncdump -n test1 test0.nc > test1.cdl
|
|
echo "*** creating test1.nc from test1.cdl..."
|
|
../ncgen/ncgen -b test1.cdl
|
|
echo "*** creating test2.cdl from test1.nc..."
|
|
./ncdump test1.nc > test2.cdl
|
|
echo "*** checking that test1.cdl and test2.cdl are the same..."
|
|
diff -b -w test1.cdl test2.cdl
|
|
|
|
echo "*** All tests of ncgen and ncdump using test0.cdl passed!"
|
|
exit 0
|