mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
90b912b7e8
Built-in type-name keywords are currently flagged when used as identifiers in formats that do not support that type. So if a user declares a dimension named "string" in a classic .cdl file, it causes an error. This PR modifies ncgen to allow those format-specific type keywords to be used as identifiers when compiling to formats that do not support that type. Also added a test for this. Also a couple of misc. changes to conditionalize some debug output.
24 lines
845 B
Bash
Executable File
24 lines
845 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
set -e
|
|
|
|
echo "*** Test use of keywords for formats where the keyword is not defined"
|
|
echo "*** classic: creating keyword1.nc from ref_keyword1.cdl..."
|
|
${NCGEN} -3 -lb -o keyword1.nc $srcdir/ref_keyword1.cdl
|
|
echo "*** creating tmp_keyword1.cdl from keyword1.nc..."
|
|
${NCDUMP} -h keyword1.nc > tmp_keyword1.cdl
|
|
echo "*** comparing tmp_keyword1.cdl to ref_keyword1.cdl..."
|
|
diff -b -w tmp_keyword1.cdl $srcdir/ref_keyword1.cdl
|
|
|
|
echo "*** cdf5: creating keyword2.nc from ref_keyword2.cdl..."
|
|
${NCGEN} -5 -lb -o keyword2.nc $srcdir/ref_keyword2.cdl
|
|
echo "*** creating tmp_keyword2.cdl from keyword2.nc..."
|
|
${NCDUMP} -h keyword2.nc > tmp_keyword2.cdl
|
|
echo "*** comparing tmp_keyword2.cdl to ref_keyword2.cdl..."
|
|
diff -b -w tmp_keyword2.cdl $srcdir/ref_keyword2.cdl
|
|
|
|
exit 0
|