netcdf-c/ncdump/tst_ncgen4.sh
dmh 7e582ad3f2 re: Jira NCF-309
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).
2014-09-18 18:26:06 -06:00

47 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
verbose=1
set -e
# To add a new test,
# 1. put the .cdl file in the 'cdl4' directory
# 2. put the result of running ncgen then ncdump
# into the directory 'expected4' as .dmp
# 3. Modify the file tst_ncgen_shared.sh to add
# the test to the end of the TESTS4 variable
# 4. Add the new files into cdl4/Makefile.am
# and expected4/Makefile.am
if test "x$builddir" = "x"; then builddir=`pwd`; fi
if test "x$srcdir" = "x"; then srcdir=`dirname $0`; fi
# Make buildir absolute
cd $builddir
builddir=`pwd`
# Make srcdir be absolute
cd $srcdir
srcdir=`pwd`
cd $builddir
export verbose
export srcdir
export builddir
KFLAG=1 ; export KFLAG
echo "*** Performing diff tests: k=1"
sh ${srcdir}/tst_ncgen4_diff.sh
echo "*** Performing cycle tests: k=1"
sh ${srcdir}/tst_ncgen4_cycle.sh
KFLAG=3 ; export KFLAG
echo "*** Performing diff tests: k=3"
sh ${srcdir}/tst_ncgen4_diff.sh
echo "*** Performing cycle tests: k=3"
sh ${srcdir}/tst_ncgen4_cycle.sh
KFLAG=4 ; export KFLAG
echo "*** Performing diff tests: k=4"
sh ${srcdir}/tst_ncgen4_diff.sh
echo "*** Performing cycle tests: k=4"
sh ${srcdir}/tst_ncgen4_cycle.sh
exit