mfile2sci() has troubles with % comments conversion (%m2scideclare, bug_942.tst bug_1662.tst bug_973.tst are KO)
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
In the [m2sci] module, 13 non regression tests fail with Scilab 6.0 while they passed with 5.5.2.
Some of them are due to some missing comments in the expected output:
1) test_run m2sci bug_942 // passes with 5.5.2, not with 6.0
fails because the first input line "function [a] = bug942 (x) % bug942"
is converted into "function [a] = bug942(x)"
instead of "function [a] = bug942(x) // bug942"
It is its only failure.
2) test_run m2sci bug_1662
"switch x % comment1" "% comment2" "case x>0 then y=''positive''"
is now converted into
"select x"
" case ...."
instead of
"select x // comment1"
" // comment2";
" case ...."
3) test_run m2sci bug_973 // maybe comment-related
"%m2scideclare ...."
is now converted into
";m2scideclare ...."
instead of just being interpreted and used without any own output:
https://help.scilab.org/docs/6.0.1/en_US/m2scideclare.html
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
test_run m2sci bug_942
test_run m2sci bug_973
test_run m2sci bug_1662
OTHER INFORMATION:
------------------
The commit https://codereview.scilab.org/20030 already fixes a bunch of issues masking the ones reported here.
Merging this commit BEFORE will ease a lot testing issues reported here.