diff --git a/src/MAT_HDF5.jl b/src/MAT_HDF5.jl index c31ac82..00d2f54 100644 --- a/src/MAT_HDF5.jl +++ b/src/MAT_HDF5.jl @@ -229,7 +229,7 @@ function m_read(g::HDF5.Group) @warn "MATLAB $mattype values are currently not supported" return missing else - error("Cannot read from a non-struct group, type was $mattype") + @warn "Unknown non-struct group of type $mattype detected; attempting to read as struct" end end if haskey(g, "MATLAB_fields") diff --git a/test/read.jl b/test/read.jl index 67e62ab..4d8c9d4 100644 --- a/test/read.jl +++ b/test/read.jl @@ -230,3 +230,10 @@ let objtestfile = "struct_table_datetime.mat" @test "testDatetime" in keys(vars) @test ismissing(vars["testDatetime"]) end + +# test reading of old-style Matlab object in v7.3 format +let objtestfile = "old_class.mat" + vars = matread(joinpath(dirname(@__FILE__), "v7.3", objtestfile)) + @test "tc_old" in keys(vars) + @test "foo" in keys(vars["tc_old"]) +end diff --git a/test/v7.3/old_class.mat b/test/v7.3/old_class.mat new file mode 100644 index 0000000..6949f6c Binary files /dev/null and b/test/v7.3/old_class.mat differ