checking nc_inq_var_chunking() with classic formats
@@ -173,6 +173,7 @@ main(int argc, char **argv)
int fill_value = TEST_VAL_42 * 2;
int shuffle_in, deflate_in, deflate_level_in;
int options_mask_in, pixels_per_block_in;
+ int storage_in;
/* Try to set fill mode after data have been written. */
sprintf(file_name, "%s_%d_%d_%d_elatefill.nc", FILE_NAME_BASE, format[f], d, a);
@@ -192,6 +193,12 @@ main(int argc, char **argv)
if (nc_inq_var_szip(ncid, varid, &options_mask_in, &pixels_per_block_in)) ERR;
if (options_mask_in || pixels_per_block_in) ERR;
+ /* Since chunking is unset for netCDF-4 files, and
+ * unavailable for classic formats, this will tell us
+ * the var is contiguous. */
+ if (nc_inq_var_chunking(ncid, varid, &storage_in, NULL)) ERR;
+ if (storage_in != NC_CONTIGUOUS) ERR;
+
if (nc_enddef(ncid)) ERR;
/* For netCDF-4, we don't actually have to write data to
* prevent future setting of the fill value. Once the user
