summaryrefslogtreecommitdiffstats
path: root/scilab/modules/functions
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-02-05 15:24:01 +0100
committerAllan CORNET <allan.cornet@scilab.org>2010-02-05 15:24:01 +0100
commitbcd9a41795283e1382944bdbe05630763233450f (patch)
tree0191027c3bd15d1f23362e115e7b4567fd18351e /scilab/modules/functions
parentf3b07f78ded09d01a8ead4821a6863d5231c13a5 (diff)
downloadscilab-bcd9a41795283e1382944bdbe05630763233450f.zip
scilab-bcd9a41795283e1382944bdbe05630763233450f.tar.gz
bug 6547 non regression test
Diffstat (limited to 'scilab/modules/functions')
-rw-r--r--scilab/modules/functions/tests/nonreg_tests/bug_6549.dia.ref78
-rw-r--r--scilab/modules/functions/tests/nonreg_tests/bug_6549.tst60
2 files changed, 138 insertions, 0 deletions
diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_6549.dia.ref b/scilab/modules/functions/tests/nonreg_tests/bug_6549.dia.ref
new file mode 100644
index 0000000..b2712e8
--- /dev/null
+++ b/scilab/modules/functions/tests/nonreg_tests/bug_6549.dia.ref
@@ -0,0 +1,78 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Allan CORNET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- Non-regression test for bug 6549 -->
8//
9// <-- Bugzilla URL -->
10// http://bugzilla.scilab.org/show_bug.cgi?id=6549
11//
12// <-- Short Description -->
13// genlib function had a behavior which was not consistent with the load function.
14// =============================================================================
15f = [
16"function titi()"
17" disp(''titi'');"
18"endfunction"
19""
20"function tata()"
21" disp(''tata'');"
22"endfunction"
23""
24"function toto()"
25" disp(''toto'');"
26"endfunction"
27""
28];
29cd TMPDIR;
30mkdir('bug_6549');
31cd('bug_6549');
32mputl(f,'toto.sci');
33if genlib('bug_6549lib',TMPDIR + '/bug_6549') <> %t then bugmes();quit;end;
34// =============================================================================
35ierr = execstr('toto','errcatch');
36
37 toto
38if ierr <> 0 then bugmes();quit;end
39ierr = execstr('titi','errcatch');
40
41 titi
42if ierr <> 0 then bugmes();quit;end
43ierr = execstr('tata','errcatch');
44
45 tata
46if ierr <> 0 then bugmes();quit;end
47clear bug_6549lib titi toto tata ierr;
48// =============================================================================
49load(TMPDIR + '/bug_6549/lib');
50ierr = execstr('toto','errcatch');
51
52 toto
53if ierr <> 0 then bugmes();quit;end
54ierr = execstr('titi','errcatch');
55
56 titi
57if ierr <> 0 then bugmes();quit;end
58ierr = execstr('tata','errcatch');
59
60 tata
61if ierr <> 0 then bugmes();quit;end
62clear bug_6549lib titi toto tata ierr;
63// =============================================================================
64bug_6549lib = lib(TMPDIR + '/bug_6549');
65ierr = execstr('toto','errcatch');
66
67 toto
68if ierr <> 0 then bugmes();quit;end
69ierr = execstr('titi','errcatch');
70
71 titi
72if ierr <> 0 then bugmes();quit;end
73ierr = execstr('tata','errcatch');
74
75 tata
76if ierr <> 0 then bugmes();quit;end
77clear bug_6549lib titi toto tata ierr;
78// =============================================================================
diff --git a/scilab/modules/functions/tests/nonreg_tests/bug_6549.tst b/scilab/modules/functions/tests/nonreg_tests/bug_6549.tst
new file mode 100644
index 0000000..f302a01
--- /dev/null
+++ b/scilab/modules/functions/tests/nonreg_tests/bug_6549.tst
@@ -0,0 +1,60 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Allan CORNET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- Non-regression test for bug 6549 -->
8//
9// <-- Bugzilla URL -->
10// http://bugzilla.scilab.org/show_bug.cgi?id=6549
11//
12// <-- Short Description -->
13// genlib function had a behavior which was not consistent with the load function.
14// =============================================================================
15f = [
16"function titi()"
17" disp(''titi'');"
18"endfunction"
19""
20"function tata()"
21" disp(''tata'');"
22"endfunction"
23""
24"function toto()"
25" disp(''toto'');"
26"endfunction"
27""
28];
29cd TMPDIR;
30mkdir('bug_6549');
31cd('bug_6549');
32mputl(f,'toto.sci');
33if genlib('bug_6549lib',TMPDIR + '/bug_6549') <> %t then pause,end;
34// =============================================================================
35ierr = execstr('toto','errcatch');
36if ierr <> 0 then pause,end
37ierr = execstr('titi','errcatch');
38if ierr <> 0 then pause,end
39ierr = execstr('tata','errcatch');
40if ierr <> 0 then pause,end
41clear bug_6549lib titi toto tata ierr;
42// =============================================================================
43load(TMPDIR + '/bug_6549/lib');
44ierr = execstr('toto','errcatch');
45if ierr <> 0 then pause,end
46ierr = execstr('titi','errcatch');
47if ierr <> 0 then pause,end
48ierr = execstr('tata','errcatch');
49if ierr <> 0 then pause,end
50clear bug_6549lib titi toto tata ierr;
51// =============================================================================
52bug_6549lib = lib(TMPDIR + '/bug_6549');
53ierr = execstr('toto','errcatch');
54if ierr <> 0 then pause,end
55ierr = execstr('titi','errcatch');
56if ierr <> 0 then pause,end
57ierr = execstr('tata','errcatch');
58if ierr <> 0 then pause,end
59clear bug_6549lib titi toto tata ierr;
60// =============================================================================