mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-31 17:50:26 +08:00
re: Discussion https://github.com/Unidata/netcdf-c/discussions/3085 This discussion raised the issue of the best way to distinguish a netcdfd-c created file and an HDF5 created file. The recommended way is to use the _NCProperties attribute. In order for users to process this attribute, I have added a parser for the attribute to the netcdf_aux.h file.
32 lines
818 B
Bash
Executable File
32 lines
818 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
set -e
|
|
|
|
# List of provenance strings to parse
|
|
# Start with some edge cases
|
|
TESTS=
|
|
TESTS="$TESTS abc=2\|z\=17,yyy=|zzz"
|
|
TESTS="$TESTS version=2,netcdf=4.7.4-development,hdf5=1.10.4"
|
|
TESTS="$TESTS version=2,netcdf=4.6.2-development,hdf5=1.10.1"
|
|
TESTS="$TESTS version=1|netcdf=4.6.2-development|hdf5=1.8.1"
|
|
|
|
# Test provenance parsing
|
|
testprov() {
|
|
rm -f tmp_provparse.txt
|
|
for t in $TESTS ; do
|
|
${execdir}/test_auxmisc -P ${t} >> tmp_provparse.txt
|
|
done
|
|
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
|
cat ${srcdir}/ref_provparse.txt
|
|
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
|
cat tmp_provparse.txt
|
|
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
|
# Verify
|
|
#diff ref_provparse.txt tmp_provparse.txt
|
|
}
|
|
|
|
testprov
|