mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-07 17:08:02 +08:00
update file permission
This commit is contained in:
parent
ac5c2f55c1
commit
7b3128b3e4
13
nczarr_test/ref_jsonconvention.cdl
Normal file
13
nczarr_test/ref_jsonconvention.cdl
Normal file
@ -0,0 +1,13 @@
|
||||
netcdf tmp_jsonconvention {
|
||||
dimensions:
|
||||
d1 = 1 ;
|
||||
variables:
|
||||
int v(d1) ;
|
||||
v:varconvention = "{\n\"key1\": [1,2,3], \"key2\": {\"key3\": \"abc\"}}" ;
|
||||
|
||||
// global attributes:
|
||||
:grpconvention = "{\"key1\": [1,2,3], \n\"key2\": {\"key3\": \"abc\"}}" ;
|
||||
data:
|
||||
|
||||
v = _ ;
|
||||
}
|
31
nczarr_test/run_jsonconvention.sh
Executable file
31
nczarr_test/run_jsonconvention.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
||||
. ../test_common.sh
|
||||
|
||||
. "$srcdir/test_nczarr.sh"
|
||||
|
||||
# This shell script tests support for:
|
||||
# read/write using json convention
|
||||
|
||||
set -e
|
||||
|
||||
testcase() {
|
||||
zext=$1
|
||||
|
||||
echo "*** Test: write then read using json convention"
|
||||
fileargs tmp_jsonconvention "mode=nczarr,$zext"
|
||||
deletemap $zext $file
|
||||
${NCGEN} -4 -b -o "$fileurl" $srcdir/ref_jsonconvention.cdl
|
||||
${NCDUMP} $fileurl > tmp_jsonconvention_${zext}.cdl
|
||||
# remove '\n' from ref file before comparing
|
||||
rm -f tmp_jsonconvention.cdl
|
||||
sed -e 's|\\n||g' < ref_jsonconvention.cdl > tmp_jsonconvention.cdl
|
||||
diff -b ${srcdir}/tmp_jsonconvention.cdl tmp_jsonconvention_${zext}.cdl
|
||||
}
|
||||
|
||||
testcase file
|
||||
#if test "x$FEATURE_NCZARR_ZIP" = xyes ; then testcase zip; fi
|
||||
#if test "x$FEATURE_S3TESTS" = xyes ; then testcase s3; fi
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user