h5d: handle slices. improve test