Open skycaptain opened 5 years ago
Maybe there is a change in 2019b about printing strings? On old Matlab,
>> a = 'hello'
a =
hello
Is that perhaps not the case in 2019b? Is that documented in their release notes?
Maybe even earlier: somewhere between 2015 and 2018...
Must be earlier. It's the same with R2019a.
Maybe even earlier: somewhere between 2015 and 2018...
My guess is R2016b, when the string array object was introduced. Display needs to show the quote character to differentiate between char arrays and strings.
As a lower bound, I'm pretty sure I was running the tests with 2017a at some point (on macOS).
So how can we fix this? Imho, rather than fixing this in code, the tests should be fixed to print the same results in Matlab and Octave, like with disp
.
What do you think?
Actually I like this change. Maybe we should propose it for Octave too.
Anyway, as @skycaptain suggests, we should use disp
where appropriate in our test set. For example: README.md and test/examples/
could call disp instead of returning a string. @skycaptain do you want to do this?
OK. I'll do a PR.
I filed https://savannah.gnu.org/bugs/index.php?56973 upstream
Actually, why does test_angle_brackets
pass? Doesn't it need a disp fix too?
I think you meant doesn't pass, right? I left this out from the PR because of the assignment to s
, but that's arguable, because that's not what this test is about.
Maybe I did.
I think it would be ok to change it to disp(test_angle_brackets())
I'll leave this open until we do that or similar. Are there any other failures on 2019b other than this and #234?
test_clear
: Error messages in Matlab are different.logical.round
: Matlab prints 4 decimals places by default (or could be just my settings?). Whatever, this just needs ellipsistest_shadow
: Dunno what's missing here, maybe it's the blankline?Heh logical.round
isn't our file: this is an example of #87 and how we deal with superclasses.
I cannot reproduce any of these on 2018b.
re: shadow: some subtle precedence rules changed in 2019b so the comments in test_shadow.m
maybe are not true? Not sure if this would lead to a test failure or not... I'll dig a little into that and maybe add a BIST about what I think should be happening here (see bist.m)
I'm using Matlab 2019b on MacOS. Running
doctest doctest
fails with:Matlab prints strings with apostrophs, Octave doesn't.
A way, which works with both Octave and Matlab is to use
disp
:disp(datestr(now, 'yyyy-mm-dd'))
.Also, - and I hope this is not just a case of Just on my machine - most of the tests running
make matlab_test
either fail or are not found. Some but not all are releated to this issue: