File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,9 @@ function m_read(dset::HDF5Dataset)
169
169
end
170
170
end
171
171
return out
172
+ elseif ! haskey (str2type_matlab,mattype)
173
+ @warn " MATLAB $mattype values are currently not supported"
174
+ return missing
172
175
end
173
176
174
177
# Regular arrays of values
@@ -272,7 +275,7 @@ Return a list of variables in an opened Matlab file.
272
275
273
276
See `matopen`.
274
277
"""
275
- names (f:: MatlabHDF5File ) = filter! (x-> x != " #refs#" , names (f. plain))
278
+ names (f:: MatlabHDF5File ) = filter! (x -> x != " #refs# " && x != " #subsystem #" , names (f. plain))
276
279
277
280
"""
278
281
exists(matfile_handle, varname) -> Bool
Original file line number Diff line number Diff line change @@ -212,3 +212,14 @@ let objtestfile = "figure.fig"
212
212
@test vars[" hgS_070000" ][" handle" ] == 1.0
213
213
@test vars[" hgS_070000" ][" type" ] == " figure"
214
214
end
215
+
216
+ # test reading file containing Matlab table and datetime objects
217
+ # since we don't support these objects, just make sure that there are no errors
218
+ # reading the file and that the variables are there and replaced with `missing`
219
+ let objtestfile = " struct_table_datetime.mat"
220
+ vars = matread (joinpath (dirname (@__FILE__ ), " v7.3" , objtestfile))[" s" ]
221
+ @test " testTable" in keys (vars)
222
+ @test ismissing (vars[" testTable" ])
223
+ @test " testDatetime" in keys (vars)
224
+ @test ismissing (vars[" testDatetime" ])
225
+ end
You can’t perform that action at this time.
0 commit comments