diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-05-15 17:33:58 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-05-15 17:33:58 (GMT) |
commit | 56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3 (patch) | |
tree | 6d76921d8b37e6286c1a8432588dc2336468a7d8 /tools/test/h5diff/h5diffgentest.c | |
parent | 7078993d63aab4e239e4ae9c970b4b19d38352fa (diff) | |
download | hdf5-56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3.zip hdf5-56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3.tar.gz hdf5-56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3.tar.bz2 |
HDFFV-10128 add test to check null term
Test is another dataset
Diffstat (limited to 'tools/test/h5diff/h5diffgentest.c')
-rw-r--r-- | tools/test/h5diff/h5diffgentest.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index cc7b057..4a929ae 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -5466,6 +5466,34 @@ static void test_objs_strings(const char *fname1, const char *fname2) H5Sclose(space); H5Dclose(dataset); + /* string 5 : early term long string */ + string4A[0][10] = 0; + string4A[0][11] = 0; + string4B[0][10] = 0; + + string4A[1][10] = 0; + string4A[1][11] = 'Z'; + string4B[1][10] = 0; + string4B[1][11] = 'x'; + + string4A[2][10] = 0; + string4B[2][10] = 0; + string4B[2][11] = 'a'; + string4B[2][12] = 'B'; + string4B[2][13] = 'c'; + space = H5Screate_simple(1, dims4, NULL); + f_type = mkstr(168, H5T_STR_NULLTERM); + m_type = mkstr(21, H5T_STR_NULLTERM); + dataset = H5Dcreate2(fid1, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4A); + H5Dclose(dataset); + dataset = H5Dcreate2(fid2, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4B); + H5Tclose(m_type); + H5Tclose(f_type); + H5Sclose(space); + H5Dclose(dataset); + out: /*----------------------------------------------------------------------- * Close IDs |