summaryrefslogtreecommitdiffstats
path: root/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.dia.ref
blob: 763e20fdb5571b54920efcc18f187bff875434c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2010 - INRIA -Serge.Steer@inria.fr
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- Non-regression test for bug 6792 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=6792
//
// <-- Short Description -->
// mis-interpretation of macro arguments when the macro call  appears in an list extraction
function [x,y]=fun(varargin), x=varargin,y=size(varargin),endfunction
function y=%foo_e(name,ml),y=fun,endfunction
M=mlist(['foo']);
M1=mlist(['foo','meth'],fun);
[x,y]=M.meth(['hello' 'world']);
if or(x<>list(['hello' 'world']))|y<>1 then bugmes();quit;end
[x,y]=M1.meth(['hello' 'world']);
if or(x<>list(['hello' 'world']))|y<>1 then bugmes();quit;end
[x,y]=M.meth('xx',list(1,2,3));
if or(x<>list('xx',list(1,2,3)))|y<>2 then bugmes();quit;end
[x,y]=M1.meth('xx',list(1,2,3));
if or(x<>list('xx',list(1,2,3)))|y<>2 then bugmes();quit;end
[x,y]=M.meth('xx',1,2,3);
if or(x<>list('xx',1,2,3))|y<>4 then bugmes();quit;end
[x,y]=M1.meth('xx',1,2,3);
if or(x<>list('xx',1,2,3))|y<>4 then bugmes();quit;end