1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2020 - Samuel GOUGEON
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // <-- CLI SHELL MODE -->
9 // <-- NO CHECK REF -->
11 // <-- Non-regression test for bug 16565 -->
13 // <-- Bugzilla URL -->
14 // http://bugzilla.scilab.org/16565
16 // <-- Short Description -->
17 // edit(user_defined_function) does not yield reliable code
19 function a = test(c,d)
20 // http://bugzilla.scilab.org/16565 :
22 // y = c{2} // yields = c{1}
23 // y = c{1,2} // yields = c{1,1}
29 // http://bugzilla.scilab.org/16576 :
30 b = gcf().children.axes_reverse(:,2)
37 try // We just need edit to create the file(). Scinotes can't be opened
41 File = pathconvert(TMPDIR) + "test.sci";
44 "function a = test(c, d)"
45 " // http://bugzilla.scilab.org/16565 :"
47 " // y = c{2} // yields = c{1}"
48 " // y = c{1,2} // yields = c{1,1}"
54 " // http://bugzilla.scilab.org/16576 :"
55 " b = gcf().children.axes_reverse(:, 2)"
62 assert_checkequal(t, Ref);