diff options
Diffstat (limited to 'tests/nonRegression/bug1619.sci')
-rw-r--r-- | tests/nonRegression/bug1619.sci | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/nonRegression/bug1619.sci b/tests/nonRegression/bug1619.sci new file mode 100644 index 0000000..cd86e6b --- /dev/null +++ b/tests/nonRegression/bug1619.sci | |||
@@ -0,0 +1,29 @@ | |||
1 | // Non-regression test file for bug 1619 | ||
2 | // Copyright INRIA | ||
3 | // Scilab Project - Serge Steer | ||
4 | // Copyright INRIA 2006 | ||
5 | // Date : 2 octobre 2006 | ||
6 | |||
7 | mode(-1); | ||
8 | clear; | ||
9 | |||
10 | |||
11 | |||
12 | deff('x=foo(n)',['if n==0 then' | ||
13 | ' x=[]' | ||
14 | 'else' | ||
15 | ' x=0' | ||
16 | ' for k=1:n' | ||
17 | ' s=svd(rand(n+10,n+10))' | ||
18 | ' x=x+s(1)' | ||
19 | ' end' | ||
20 | 'end'],'p') | ||
21 | T1=execstr('T=macr2tree(foo)','errcatch')==0; | ||
22 | clear foo; | ||
23 | function y=foo(),y=sin(33)+1;endfunction | ||
24 | foo(); //execution creates a deleted op in the pseudo code of foo | ||
25 | T2=execstr('macr2tree(foo)','errcatch')==0 | ||
26 | affich_result(T1&T2,1619); | ||
27 | |||
28 | clear | ||
29 | |||