1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2019 - Samuel GOUGEON
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // <-- CLI SHELL MODE -->
9 // <-- ENGLISH IMPOSED -->
11 // <-- Non-regression test for bug 16181 -->
13 // <-- Bugzilla URL -->
14 // http://bugzilla.scilab.org/16181
16 if ~isdef("m2scikernellib") then
17 load("SCI/modules/m2sci/macros/kernel/lib")
19 txt = mgetl("SCI/modules/m2sci/tests/nonreg_tests/bug_16181.m");
20 printf("%s\n", replace_end_dollar(txt));
22 % a($:-1:2) in comments
27 if true, a=1, end, b=3
42 a(6:$) = [3 4], a($) = 5
45 append($:-1:2) = 1:endy
53 a ( $ , 2 : $ ) = [3 4]
54 a ( $ , 2 : $ - 1) = 3
57 a ( 6 : $ ) = [3 4], a( $ ) = 5
60 append ( $ : -1 : 2 ) = 1:endy
74 a{6:$} = [3 4], a{$} = 5
77 append{$:-1:2} = 1:endy
85 a { $ , 2 : $ } = [3 4]
86 a { $ , 2 : $ - 1} = 3
89 a { 6 : $ } = [3 4], a{ $ } = 5
92 append { $ : -1 : 2 } = 1:endy