loadmatfile: make more automatic the detection of the input data format
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
loadmatfile: make more automatic the detection of the input data format.
ERROR LOG:
----------
--> loadmatfile("octave_double-v6.dat") // ==> Must be recognized as a .mat file
at line 51 of function evstr ( SCI\modules\string\macros\evstr.sci line 66 )
at line 126 of function loadmatfile ( SCI\modules\matio\macros\loadmatfile.sci line 139 )
evstr: Argument #1: Some expression can't be evaluated (Undefined variable: MATLAB).
--> loadmatfile("octave_double-v7.dat") // ==> Must be recognized as a .mat file
at line 1 of executed string
at line 48 of function evstr ( SCI\modules\string\macros\evstr.sci line 63 )
at line 126 of function loadmatfile ( SCI\modules\matio\macros\loadmatfile.sci line 139 )
evstr: Argument #1: Some expression can't be evaluated (%val=[[MATLAB 5.0 MAT-file, written by Octave 5.1.0, 2019-12-07 01:55:02 UTC ]; ^^Error: Unexpected token '' within a matrix.).
--> loadmatfile("octave_double-binary.dat") // ==> Must properly fail as an unsupported "Octave binary" file.
at line 51 of function evstr ( SCI\modules\string\macros\evstr.sci line 66 )
at line 126 of function loadmatfile ( SCI\modules\matio\macros\loadmatfile.sci line 139 )
evstr: Argument #1: Some expression can't be evaluated (Undefined variable: Octave).
--> loadmatfile("octave_double-hdf5.dat") // ==> Must properly fail as an unsupported "HDF" file.
at line 51 of function evstr ( SCI\modules\string\macros\evstr.sci line 66 )
at line 126 of function loadmatfile ( SCI\modules\matio\macros\loadmatfile.sci line 139 )
evstr: Argument #1: Some expression can't be evaluated (Undefined variable: ‰HDF).
--> loadmatfile("octave_booleans.txt") // ==> Must be recognized as an "Octave text" file (see the bug 16142).
at line 1 of executed string
at line 48 of function evstr ( SCI\modules\string\macros\evstr.sci line 63 )
at line 126 of function loadmatfile ( SCI\modules\matio\macros\loadmatfile.sci line 139 )
evstr: Argument #1: Some expression can't be evaluated (%val=[[# Created by Octave 5.1.0, Thu Nov 28 16:11:10 2019 GMT <unknown@unknown>]; ^^Error: syntax error, unexpected ]).