mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-23 16:59:54 +08:00
more tests
This commit is contained in:
parent
acbd3e259e
commit
58f422e2a8
@ -622,7 +622,7 @@ main(int argc, char **argv)
|
||||
#define DIM4_LEN 10
|
||||
{
|
||||
int dimids[NDIMS4], dimids_in[NDIMS4];
|
||||
int varid;
|
||||
int varid, varid1;
|
||||
int ndims, nvars, natts, unlimdimid;
|
||||
nc_type xtype_in;
|
||||
char name_in[NC_MAX_NAME + 1];
|
||||
@ -678,6 +678,10 @@ main(int argc, char **argv)
|
||||
/* Open the file and check the same stuff. */
|
||||
if (nc_open(FILE_NAME, NC_NOWRITE, &ncid)) ERR;
|
||||
|
||||
/* This won't work. */
|
||||
if (nc_def_var(ncid, "this_wont_work", NC_BYTE, NDIMS4, dimids,
|
||||
&varid1) != NC_EPERM) ERR;
|
||||
|
||||
if (nc_inq(ncid, &ndims, &nvars, &natts, &unlimdimid)) ERR;
|
||||
if (ndims != NDIMS4 || nvars != 1 || natts != 0 ||
|
||||
unlimdimid != -1) ERR;
|
||||
|
Loading…
Reference in New Issue
Block a user