summaryrefslogtreecommitdiffstats
path: root/scilab/modules/compatibility_functions
diff options
context:
space:
mode:
authorPierre LANDO <pierre.lando@scilab.org>2010-05-11 10:10:59 +0200
committerSylvestre Ledru <sylvestre.ledru@scilab.org>2010-05-11 11:41:13 +0200
commit58abdc225092a64c655fe71b67a25a71b76bd789 (patch)
tree973992bc2e8ac6900e37e0a5187d4a0d8ae4b7ec /scilab/modules/compatibility_functions
parent1df1da98f15fb8a0df3cbfdcd8c08f8770b2e27e (diff)
downloadscilab-58abdc225092a64c655fe71b67a25a71b76bd789.zip
scilab-58abdc225092a64c655fe71b67a25a71b76bd789.tar.gz
Bug 7079: "mtlb_get" used a "h" global variable instead of the given "H" parameter.
Change-Id: I9e561f5286240062bd2330e44e6ac596e765f1b7
Diffstat (limited to 'scilab/modules/compatibility_functions')
-rw-r--r--scilab/modules/compatibility_functions/macros/mtlb_get.sci2
-rw-r--r--scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.dia.ref18
-rw-r--r--scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.tst23
3 files changed, 42 insertions, 1 deletions
diff --git a/scilab/modules/compatibility_functions/macros/mtlb_get.sci b/scilab/modules/compatibility_functions/macros/mtlb_get.sci
index 3252e9f..4f4c437 100644
--- a/scilab/modules/compatibility_functions/macros/mtlb_get.sci
+++ b/scilab/modules/compatibility_functions/macros/mtlb_get.sci
@@ -11,7 +11,7 @@ function v=mtlb_get(H,property)
11 11
12[lhs,rhs]=argn() 12[lhs,rhs]=argn()
13win=xget('window') 13win=xget('window')
14xset('window',h) 14xset('window',H)
15if rhs==1 then 15if rhs==1 then
16else 16else
17 v=[] 17 v=[]
diff --git a/scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.dia.ref b/scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.dia.ref
new file mode 100644
index 0000000..09c15aa
--- /dev/null
+++ b/scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.dia.ref
@@ -0,0 +1,18 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Pierre Lando <pierre.lando@scilab.org>
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- TEST WITH GRAPHIC -->
8// <-- Non-regression test for bug 7079 -->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/show_bug.cgi?id=7079
12//
13// <-- Short Description -->
14// "mtlb_get" used a "h" global variable instead of the given "H" parameter.
15h=8;
16f=scf(0);
17f.color_map=jetcolormap(14);
18if size(mtlb_get(0, "colormap"), "*") <> 42 then bugmes();quit;end;
diff --git a/scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.tst b/scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.tst
new file mode 100644
index 0000000..5b1de16
--- /dev/null
+++ b/scilab/modules/compatibility_functions/tests/nonreg_tests/bug_7079.tst
@@ -0,0 +1,23 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Pierre Lando <pierre.lando@scilab.org>
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- TEST WITH GRAPHIC -->
9
10// <-- Non-regression test for bug 7079 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/show_bug.cgi?id=7079
14//
15// <-- Short Description -->
16// "mtlb_get" used a "h" global variable instead of the given "H" parameter.
17
18
19h=8;
20f=scf(0);
21f.color_map=jetcolormap(14);
22if size(mtlb_get(0, "colormap"), "*") <> 42 then pause, end;
23