summaryrefslogtreecommitdiffstats
path: root/scilab/modules/functions
diff options
context:
space:
mode:
authorPierre MARECHAL <pierre.marechal@scilab.org>2010-03-30 18:17:49 +0200
committerPierre MARECHAL <pierre.marechal@scilab.org>2010-03-30 18:17:49 +0200
commitbe97b5f01b942c292aea23f84fe7f285087ab4d0 (patch)
tree25b390d1b66ea1b6f527481951b2801a92258bcc /scilab/modules/functions
parent9af46627fddfbfa81a5fecf8170513a20d6051ef (diff)
parent4236427a471bfe602b1f67648aa82f18cd74178e (diff)
downloadscilab-be97b5f01b942c292aea23f84fe7f285087ab4d0.zip
scilab-be97b5f01b942c292aea23f84fe7f285087ab4d0.tar.gz
Merge commit 'origin/5.2'
Diffstat (limited to 'scilab/modules/functions')
-rw-r--r--scilab/modules/functions/macros/fun2string.sci2
-rw-r--r--scilab/modules/functions/tests/nonreg_tests/bug_6841.dia.ref27
-rw-r--r--scilab/modules/functions/tests/nonreg_tests/bug_6841.tst19
3 files changed, 47 insertions, 1 deletions
diff --git a/scilab/modules/functions/macros/fun2string.sci b/scilab/modules/functions/macros/fun2string.sci
index d65212c..7b59804 100644
--- a/scilab/modules/functions/macros/fun2string.sci
+++ b/scilab/modules/functions/macros/fun2string.sci
@@ -361,7 +361,7 @@ function [stk,txt,ilst]=exp2sci(lst,ilst)
361 stk(top)=list(op(2),'0') 361 stk(top)=list(op(2),'0')
362 m=%f 362 m=%f
363 elseif type(stk(top)(1))==10 then 363 elseif type(stk(top)(1))==10 then
364 if op(4)=='1'&funptr(op(2))==0&exists(op(2))==0|and(type(evstr(op(2)))<>[11 13 130]) then 364 if op(4)=='1'&funptr(op(2))==0&exists(op(2))==0|(execstr(op(2),"errcatch")==0&and(type(evstr(op(2)))<>[11 13 130])) then
365 top=top+1 365 top=top+1
366 stk(top)=list(op(2),'0') 366 stk(top)=list(op(2),'0')
367 m=%f 367 m=%f
diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_6841.dia.ref b/scilab/modules/functions/tests/nonreg_tests/bug_6841.dia.ref
new file mode 100644
index 0000000..1b2198f
--- /dev/null
+++ b/scilab/modules/functions/tests/nonreg_tests/bug_6841.dia.ref
@@ -0,0 +1,27 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Vincent COUVERT
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- Non-regression test for bug 6841 -->
8//
9// <-- Bugzilla URL -->
10// http://bugzilla.scilab.org/show_bug.cgi?id=6841
11//
12// <-- Short Description -->
13// fun2string does not work on a simple example.
14function myfoo ( )
15 B = zeros(2,1)
16 v = B(1,1)
17endfunction
18fun2string(myfoo)
19 ans =
20
21!function []=ans() !
22! !
23! B = zeros(2, 1) !
24! !
25! v = B(1, 1) !
26! !
27!endfunction !
diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_6841.tst b/scilab/modules/functions/tests/nonreg_tests/bug_6841.tst
new file mode 100644
index 0000000..dcf83ea
--- /dev/null
+++ b/scilab/modules/functions/tests/nonreg_tests/bug_6841.tst
@@ -0,0 +1,19 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Vincent COUVERT
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- Non-regression test for bug 6841 -->
8//
9// <-- Bugzilla URL -->
10// http://bugzilla.scilab.org/show_bug.cgi?id=6841
11//
12// <-- Short Description -->
13// fun2string does not work on a simple example.
14
15function myfoo ( )
16 B = zeros(2,1)
17 v = B(1,1)
18endfunction
19fun2string(myfoo) \ No newline at end of file