summaryrefslogtreecommitdiffstats
path: root/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst
diff options
context:
space:
mode:
authorSerge Steer <serge.steer@scilab.org>2010-03-22 11:31:58 +0100
committerSerge Steer <serge.steer@scilab.org>2010-03-22 11:31:58 +0100
commite221259a66f2cf8b43b81fd916abf0a6a8b88c8e (patch)
tree4eced3097f3a2559396487dad4d112dfa0bfac14 /scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst
parent5ae97a6f56abe4c253dbabfb33babdff7b4a6e53 (diff)
downloadscilab-e221259a66f2cf8b43b81fd916abf0a6a8b88c8e.zip
scilab-e221259a66f2cf8b43b81fd916abf0a6a8b88c8e.tar.gz
bug 6792 fix
Diffstat (limited to 'scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst')
-rw-r--r--scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst37
1 files changed, 37 insertions, 0 deletions
diff --git a/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst b/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst
new file mode 100644
index 0000000..5f01e5d
--- /dev/null
+++ b/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst
@@ -0,0 +1,37 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - INRIA -Serge.Steer@inria.fr
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- Non-regression test for bug 6792 -->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/show_bug.cgi?id=6792
12//
13// <-- Short Description -->
14// mis-interpretation of macro arguments when the macro call appears in an list extraction
15function [x,y]=fun(varargin), x=varargin,y=size(varargin),endfunction
16function y=%foo_e(name,ml),y=fun,endfunction
17
18M=mlist(['foo']);
19M1=mlist(['foo','meth'],fun);
20
21[x,y]=M.meth(['hello' 'world']);
22if or(x<>list(['hello' 'world']))|y<>1 then pause,end
23[x,y]=M1.meth(['hello' 'world']);
24if or(x<>list(['hello' 'world']))|y<>1 then pause,end
25
26[x,y]=M.meth('xx',list(1,2,3));
27if or(x<>list('xx',list(1,2,3)))|y<>2 then pause,end
28
29[x,y]=M1.meth('xx',list(1,2,3));
30if or(x<>list('xx',list(1,2,3)))|y<>2 then pause,end
31
32[x,y]=M.meth('xx',1,2,3);
33if or(x<>list('xx',1,2,3))|y<>4 then pause,end
34
35[x,y]=M1.meth('xx',1,2,3);
36if or(x<>list('xx',1,2,3))|y<>4 then pause,end
37