mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-21 08:39:46 +08:00
6abaab967b
re: PR https://github.com/Unidata/netcdf-c/pull/2492 re: Issue https://github.com/Unidata/netcdf-c/issues/2494 This PR fixes some problems with the pull request https://github.com/Unidata/netcdf-c/pull/2492 in response to Issue https://github.com/Unidata/netcdf-c/issues/2494. * Found and fixed more scalar handling problems and add a test case for scalars. * Cleanup nczarr_test/run_string.sh test * Document *_nczarr_default_maxstrlen* and *_nczarr_maxstrlen*. * Support both "Nan" and *Nan* as being floating point constants for attributes. It is unclear from the Zarr V2 spec if unquoted *Nan* is legal or not, but support for reading. Write the quoted versions when writing an attribute. Similar for Infinity constants. So NCZarr supports the following constants for use in Attributes * *Nan*, "Nan", *-Nan*, "-Nan" * *Nanf*, "Nanf", *-Nanf*, "-Nanf" * *Infinity*, "Infinity", *-Infinity*, "-Infinity" * *Infinityf*, "Infinityf", *-Infinityf*, "-Infinityf"
28 lines
731 B
Bash
Executable File
28 lines
731 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
. "$srcdir/test_nczarr.sh"
|
|
|
|
# This shell script runs test_quantize
|
|
|
|
set -e
|
|
|
|
testcase() {
|
|
zext=$1
|
|
fileargs tmp_quantize "mode=$zarr,$zext"
|
|
case "$zext" in
|
|
file) template="file://${execdir}/%s.zarr#mode=zarr,$zext" ;;
|
|
zip) template="file://${execdir}/%s.zip#mode=zarr,$zext" ;;
|
|
s3) template="s3://${NCZARR_S3_TEST_BUCKET}/netcdf-c/%s.zarr#mode=zarr,$zext" ;;
|
|
*) echo "unknown file type"; exit 1 ;;
|
|
esac
|
|
${execdir}/test_quantize "$template"
|
|
}
|
|
|
|
testcase file
|
|
if test "x$FEATURE_NCZARR_ZIP" = xyes ; then testcase zip; fi
|
|
# There is a (currently) untraceable bug when using S3
|
|
#if test "x$FEATURE_S3TESTS" = xyes ; then testcase s3; fi
|