This commit is contained in:
Dennis Heimbigner 2022-04-06 17:16:40 -06:00
parent d5798aff2e
commit 56167a7775
3 changed files with 6 additions and 4 deletions

View File

@ -28,7 +28,8 @@ main() {
fclose(fp);
int ncid;
if (nc_open(FILE_NAME, 0, &ncid) != NC_EHDFERR) ERR;
int stat=nc_open(FILE_NAME, 0, &ncid);
if (stat != NC_EHDFERR && stat != NC_ENOTNC) ERR;
}
{

View File

@ -73,7 +73,7 @@ IF(ENABLE_TESTS)
BUILD_BIN_TEST(zmapio ${COMMONSRC})
TARGET_INCLUDE_DIRECTORIES(zmapio PUBLIC ../libnczarr)
BUILD_BIN_TEST(zhex)
BUILD_BIN_TEST(zisjson)
BUILD_BIN_TEST(zisjson ${COMMONSRC})
TARGET_INCLUDE_DIRECTORIES(zisjson PUBLIC ../libnczarr)
BUILD_BIN_TEST(zs3parse ${COMMONSRC})
TARGET_INCLUDE_DIRECTORIES(zs3parse PUBLIC ../libnczarr)
@ -108,6 +108,7 @@ IF(ENABLE_TESTS)
add_sh_test(nczarr_test run_interop)
add_sh_test(nczarr_test run_misc)
add_sh_test(nczarr_test run_nczarr_fill)
add_sh_test(nczarr_test run_jsonconvention)
BUILD_BIN_TEST(test_quantize ${TSTCOMMONSRC})
add_sh_test(nczarr_test run_quantize)

View File

@ -20,8 +20,8 @@ ${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
sed -e 's|\\n||g' < ${srcdir}/ref_jsonconvention.cdl > tmp_jsonconvention.cdl
diff -b tmp_jsonconvention.cdl tmp_jsonconvention_${zext}.cdl
}
testcase file