summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPierre Marechal <pierre.marechal@scilab.org>2007-11-26 19:28:53 +0000
committerPierre Marechal <pierre.marechal@scilab.org>2007-11-26 19:28:53 +0000
commitae190591722c6cddf27deab59d6c417a4a795133 (patch)
treef9b9760ef8d3e8d04e911cfac1e88297a3f09f2a /tests
parenteb539afe8cc1f545648c18fa0913bcb171c7a27a (diff)
downloadscilab-ae190591722c6cddf27deab59d6c417a4a795133.zip
scilab-ae190591722c6cddf27deab59d6c417a4a795133.tar.gz
Incoporate non-regression test files in the scilab source tree
Diffstat (limited to 'tests')
-rw-r--r--tests/nonRegression/bug1180.sci32
-rw-r--r--tests/nonRegression/bug1183.sci20
-rw-r--r--tests/nonRegression/bug1198.sci24
-rw-r--r--tests/nonRegression/bug1200.sci33
-rw-r--r--tests/nonRegression/bug1224.sci25
-rw-r--r--tests/nonRegression/bug1227.sci29
-rw-r--r--tests/nonRegression/bug1239.sci35
-rw-r--r--tests/nonRegression/bug1249.sci45
-rw-r--r--tests/nonRegression/bug1321.sci28
-rw-r--r--tests/nonRegression/bug1448.sci28
-rw-r--r--tests/nonRegression/bug1469.sci206
-rw-r--r--tests/nonRegression/bug1491.sci45
-rw-r--r--tests/nonRegression/bug1505.sci34
-rw-r--r--tests/nonRegression/bug1506.sci43
-rw-r--r--tests/nonRegression/bug1560.sci47
-rw-r--r--tests/nonRegression/bug1566.sci42
-rw-r--r--tests/nonRegression/bug1568.sci43
-rw-r--r--tests/nonRegression/bug1586.sci47
-rw-r--r--tests/nonRegression/bug1587.sci40
19 files changed, 0 insertions, 846 deletions
diff --git a/tests/nonRegression/bug1180.sci b/tests/nonRegression/bug1180.sci
deleted file mode 100644
index 47ab94a..0000000
--- a/tests/nonRegression/bug1180.sci
+++ /dev/null
@@ -1,32 +0,0 @@
1// <-- Non-regression test for bug 1180 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1180
5//
6// <-- Short Description -->
7// mtlb_filter lines
8//
9// b=b*z^(max(degree(a)-degree(b),0))
10// a=a*z^(max(degree(b)-degree(a),0))
11//
12// should be replaced by :
13//
14// da = degree(a)
15// db = degree(b)
16// if (da-db) > 0 then b=b*z^(da-db); end
17// if (db-da) > 0 then a=a*z^(db-da); end
18
19// Pierre MARECHAL - Scilab Project
20// Copyright INRIA
21// 1er juin 2005
22
23x = zeros(1:10);
24x(5) = 1;
25b = [ 0 1 0 ]
26y = mtlb_filter(b,1,x);
27
28if y==[0,0,0,0,0,1,0,0,0,0] then
29 affich_result(%T,1180);
30else
31 affich_result(%F,1180);
32end
diff --git a/tests/nonRegression/bug1183.sci b/tests/nonRegression/bug1183.sci
deleted file mode 100644
index b98c8c5..0000000
--- a/tests/nonRegression/bug1183.sci
+++ /dev/null
@@ -1,20 +0,0 @@
1// <-- Non-regression test for bug 1183 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1183
5//
6// <-- Short Description -->
7// @?
8
9// Pierre MARECHAL - Scilab Project
10// Copyright INRIA
11// 1er juin 2005
12
13A =1@1
14B=lasterror()
15
16if B=='Missing operator, comma, or semicolon' then
17 affich_result(%T,1183);
18else
19 affich_result(%F,1183);
20end
diff --git a/tests/nonRegression/bug1198.sci b/tests/nonRegression/bug1198.sci
deleted file mode 100644
index 7b3b3e9..0000000
--- a/tests/nonRegression/bug1198.sci
+++ /dev/null
@@ -1,24 +0,0 @@
1// <-- Non-regression test for bug 1198 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1198
5//
6// <-- Short Description -->
7// For the latest version of Scilab scilab-3.0-u-20050128 on a
8// Windows 2000 platform.
9//
10// The program crashes instead of reporting a sytax error.
11
12// Pierre MARECHAL - Scilab Project
13// Copyright INRIA
14// 1er juin 2005
15
16G = syslin('c', [1 0 ; 0 1], [ 1; 1], [1 1]);
17minss(G)("A")
18B=lasterror()
19
20if B=='invalid index' then
21 affich_result(%T,1198);
22else
23 affich_result(%F,1198);
24end
diff --git a/tests/nonRegression/bug1200.sci b/tests/nonRegression/bug1200.sci
deleted file mode 100644
index 4cd8e2f..0000000
--- a/tests/nonRegression/bug1200.sci
+++ /dev/null
@@ -1,33 +0,0 @@
1// <-- Non-regression test for bug 1200 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1200
5//
6// <-- Short Description -->
7// Incoherence dans le format d'un nombre.
8// En prenant par exemple j=0.001, on obtient un affichage
9// incoherent avec format :
10// format("v",6) => 0.001
11// format("v",7) => 1.E-3
12// format("v",8) => 0.001
13
14// Pierre MARECHAL - Scilab Project
15// Copyright INRIA
16// 1er juin 2005
17
18J=0.001;
19format("v",7);
20diary(TMPDIR+"/bug1200.dia");
21disp(J);
22diary(0);
23
24DIAFILECONTENTS=mgetl(TMPDIR+"/bug1200.dia");
25
26REFFILECONTENTS=[" ";
27 " 0.001 ";]
28
29if and(DIAFILECONTENTS==REFFILECONTENTS) then
30 affich_result(%T,1200);
31else
32 affich_result(%F,1200);
33end
diff --git a/tests/nonRegression/bug1224.sci b/tests/nonRegression/bug1224.sci
deleted file mode 100644
index 0aa460b..0000000
--- a/tests/nonRegression/bug1224.sci
+++ /dev/null
@@ -1,25 +0,0 @@
1// <-- Non-regression test for bug 1224 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1224
5//
6// <-- Short Description -->
7// Product of 2x2 matrices produces wrong result.
8// inf=%inf;
9// A=diag([-inf,inf]);
10// A*A //This is correct
11// A*A*A //This is wrong
12
13// Pierre MARECHAL - Scilab Project
14// Copyright INRIA
15// 1er juin 2005
16
17inf=%inf;
18A=diag([-inf,inf]);
19B = A*A*A;
20
21if isnan(B) then
22 affich_result(%T,1224);
23else
24 affich_result(%F,1224);
25end
diff --git a/tests/nonRegression/bug1227.sci b/tests/nonRegression/bug1227.sci
deleted file mode 100644
index 1c05b4b..0000000
--- a/tests/nonRegression/bug1227.sci
+++ /dev/null
@@ -1,29 +0,0 @@
1// <-- Non-regression test for bug 1227 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1227
5//
6// <-- Short Description -->
7// -->a=1;savematfile('file','a')
8// WARNING:Option -v6 added
9// !--error 246
10// function not defined for given argument type(s)
11// Check arguments or define function %s_strindex
12// for overloading
13// at line 287 of function savematfile called by :
14// savematfile('totoo','a')
15
16// File : bug 1227
17// Author : Pierre MARECHAL
18// Last modified : 2 Mar 2005
19
20a = 123456789;
21savematfile(TMPDIR+'/file_1232.mat','a');
22clear a
23loadmatfile(TMPDIR+'/file_1232.mat','a');
24
25if( a == 123456789 ) then
26 affich_result(%T, 1227)
27else
28 affich_result(%F, 1227)
29end
diff --git a/tests/nonRegression/bug1239.sci b/tests/nonRegression/bug1239.sci
deleted file mode 100644
index 0ffca1d..0000000
--- a/tests/nonRegression/bug1239.sci
+++ /dev/null
@@ -1,35 +0,0 @@
1// <-- Non-regression test for bug 1239 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1239
5//
6// <-- Short Description -->
7// This bug was found by Marek. He says us in the newsgroup:
8//
9// It seems that nanmax, nanmin functions are not working well,
10// or at
11// least not according to documentation(they should supposedly
12// ignore %nan
13// values). I get the wollowing results in scilab 3.0:
14//
15// -->nanmax([%nan, -1])
16// ans = Inf
17//
18// -->nanmax([%nan, 1])
19// ans = Inf
20// The same for nanmin.
21// ========================================================
22//
23// Btw, on a scilab cvs I don't see any problem with nanmin.
24//
25// Bruno
26
27// Author : Scilab Project - Pierre MARECHAL
28// Copyright INRIA
29// Date : 21 Mar 2005
30
31if( (nanmax([%nan, -1]) <> -1) | (nanmax([%nan, 1]) <> 1) | (nanmin([%nan, -1]) <> -1) | (nanmin([%nan, 1]) <> 1) ) then
32 affich_result(%F,1239);
33else
34 affich_result(%T,1239);
35end
diff --git a/tests/nonRegression/bug1249.sci b/tests/nonRegression/bug1249.sci
deleted file mode 100644
index 170b96e2..0000000
--- a/tests/nonRegression/bug1249.sci
+++ /dev/null
@@ -1,45 +0,0 @@
1// <-- Non-regression test for bug 1249 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1249
5//
6// <-- Short Description -->
7// When using the command
8// -->calendar()
9// ans =
10//
11//
12// ans(1)
13//
14// Mar 2005
15//
16// ans(2)
17//
18// S M Tu W Th F S
19//
20// ans(3)
21//
22// ! 0. 1. 2. 3. 4. 5. 6. !
23// ! 7. 8. 9. 10. 11. 12. 13. !
24// ! 14. 15. 16. 17. 18. 19. 20. !
25// ! 21. 22. 23. 24. 25. 26. 27. !
26// ! 28. 29. 30. 31. 0. 0. 0. !
27// ...
28
29// Author : Scilab Project - Pierre MARECHAL
30// Copyright INRIA
31// Date : 21 Mar 2005
32
33M = calendar(2005,3);
34
35M1ref = ['Mar 2005'];
36M2ref = [' M Tu W Th F Sat Sun'];
37M3ref = [0,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,30,31,0,0,0;0,0,0,0,0,0,0];
38
39Mref = list(M1ref,M2ref,M3ref );
40
41if or((Mref<>M) <> [%F,%F,%F]) then
42 affich_result(%F,1249);
43else
44 affich_result(%T,1249);
45end
diff --git a/tests/nonRegression/bug1321.sci b/tests/nonRegression/bug1321.sci
deleted file mode 100644
index 5279319..0000000
--- a/tests/nonRegression/bug1321.sci
+++ /dev/null
@@ -1,28 +0,0 @@
1// <-- Non-regression test for bug 1321 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1321
5//
6// <-- Short Description -->
7// Function findobj does not work when property value contains
8// capital letters and is case sensitive for property name.
9
10// Copyright INRIA
11// Scilab Project - V. Couvert
12
13h=figure(1);
14
15t = uicontrol( h, "style","text", ...
16 "string","This is a figure", ...
17 "position",[50 70 100 100], ...
18 "fontsize",15, ...
19 "tag","Alabel");
20
21correct = findobj("tag","Alabel")==t & ...
22 isempty(findobj("tag","alabel")) & ...
23 findobj("Tag","Alabel")==t & ...
24 isempty(findobj("Tag","alabel"));
25
26close(1);
27
28affich_result(correct,1321);
diff --git a/tests/nonRegression/bug1448.sci b/tests/nonRegression/bug1448.sci
deleted file mode 100644
index 6ee7896..0000000
--- a/tests/nonRegression/bug1448.sci
+++ /dev/null
@@ -1,28 +0,0 @@
1// <-- Non-regression test for bug 1448 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1448
5//
6// <-- Short Description -->
7// Bug detected in 3.1.1 under Windows XP.
8// Bug relative to function rotate
9//
10// A positive angle corresponds to a clockwise rotation, then in the
11// negative mathematical way.
12//
13// Jacques-Deric
14
15// Copyright INRIA
16// Scilab Project - Jean-Baptiste Silvy
17// Copyright INRIA 2006
18// Date : October 20 2006
19
20point1 = [1 ; 0];
21point2 = rotate (point1, %pi/2),
22
23
24if ( norm( point2 - [0;1] ) < 10e-10 ) then
25 affich_result(%T,1448);
26else
27 affich_result(%F,1448);
28end
diff --git a/tests/nonRegression/bug1469.sci b/tests/nonRegression/bug1469.sci
deleted file mode 100644
index fb2bb83..0000000
--- a/tests/nonRegression/bug1469.sci
+++ /dev/null
@@ -1,206 +0,0 @@
1// <-- Non-regression test for bug 1469 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1469
5//
6// <-- Short Description -->
7// Comments modify line numbering in functions
8//
9// What you don't believe?
10//
11// Try this:
12//
13// 1st test, no comment in line 1:
14//
15// -->function foo1()
16// --> function foo3
17// --> endfunction
18// --> disp("line a");
19// --> disp("line b");
20// --> disp("line c");
21// -->endfunction
22//
23// -->setbpt("foo1",[3,4])
24//
25// -->foo1()
26// Stop after row 3 in function foo1 :
27// ...
28
29// Copyright INRIA
30// Scilab Project - Serge Steer
31// Copyright INRIA 2006
32// Date : 23 novembre 2006
33
34//test of line numbering in functions, handling initial comments
35
36function foo,endfunction
37L=macr2lst(foo);
38R1=L(4)(1)=='15'&size(L)==6
39clear foo;
40
41function foo,,endfunction
42L=macr2lst(foo);
43R2=L(4)(1)=='15'&size(L)==6
44clear foo;
45
46function foo(),endfunction
47L=macr2lst(foo);
48R3=L(4)(1)=='15'&size(L)==6
49clear foo;
50
51function foo(),a=1,endfunction
52L=macr2lst(foo);
53R4=L(4)(1)=='6'&size(L)==8
54clear foo;
55
56function foo
57endfunction
58L=macr2lst(foo);
59R5=L(4)(1)=='15'&size(L)==6
60clear foo;
61
62
63function foo,
64endfunction
65L=macr2lst(foo);
66R6=L(4)(1)=='15'&size(L)==6
67clear foo;
68
69
70function foo//ZZZZ
71endfunction
72L=macr2lst(foo);
73R7=L(4)(1)=='31'&L(5)(1)=='15'&size(L)==7
74clear foo;
75
76
77function foo,//ZZZZ
78endfunction
79L=macr2lst(foo);
80R8=L(4)(1)=='31'&L(5)(1)=='15'&size(L)==7
81clear foo;
82
83
84function foo
85//ZZZZ
86endfunction
87L=macr2lst(foo);
88R9=L(4)(1)=='15'&L(5)(1)=='31'&size(L)==8
89clear foo;
90
91
92function foo,//ZZZZ
93 a=1
94endfunction
95L=macr2lst(foo);
96R10=L(4)(1)=='31'&L(5)(1)=='15'&L(6)(1)=='6'&size(L)==10
97clear foo;
98
99
100function loc=foo,[l,w]=where(),loc=l(1),endfunction
101R11= and(foo()==1)
102clear foo;
103
104
105function loc=foo,//ZZZZ
106 [l,w]=where(),loc=l(1)
107endfunction
108R12= and(foo()==2)
109clear foo;
110
111function loc=foo
112//ZZZZ
113 [l,w]=where(),loc=l(1)
114endfunction
115R13= and(foo()==3)
116clear foo;
117
118
119function loc=foo1()
120 [l,w]=where(),loc=l(1)
121 function loc=foo3(loc)
122 [l,w]=where(),loc=[loc,l(1:2)']
123 endfunction
124 [l,w]=where(),loc=[loc,l(1)]
125 loc=foo3(loc)
126endfunction
127R14= and(foo1()==[2,6,2,7])
128clear foo1;
129
130function loc=foo1()//ZZZZZZZ
131 [l,w]=where(),loc=l(1)
132 function loc=foo3(loc)
133 [l,w]=where(),loc=[loc,l(1:2)']
134 endfunction
135 [l,w]=where(),loc=[loc,l(1)]
136 loc=foo3(loc)
137endfunction
138L=macr2lst(foo1);
139R15=and(foo1()==[2,6,2,7])&(L(4)(1)=='31')&(L(5)=='15')
140clear foo1;
141
142
143function loc=foo1()
144 //ZZZZZZZ
145 [l,w]=where(),loc=l(1)
146 function loc=foo3(loc)
147 [l,w]=where(),loc=[loc,l(1:2)']
148 endfunction
149 [l,w]=where(),loc=[loc,l(1)]
150 loc=foo3(loc)
151endfunction
152L=macr2lst(foo1);
153R16=and(foo1()==[3,7,2,8])&(L(4)=='15')&(L(5)(1)=='31')
154clear foo1;
155
156
157//pb execution des macros non compilee
158deff('y=foo(a,b,c)','y=a+b+c','n')
159R17=foo('aaa','bbb','cc')=='aaabbbcc'
160clear foo
161
162deff('y=foo(a,b,c)',['','y=a+b+c'],'n')
163R18=foo('aaa','bbb','cc')=='aaabbbcc'
164
165comp(foo)
166R19=foo('aaa','bbb','cc')=='aaabbbcc'
167clear foo
168
169//function definition nested in a or loop!
170z=0;R20=%t
171for k=1:2
172 function y=foo()
173 y=k
174 endfunction
175 L=macr2lst(foo);
176 R20=R20&(L(4)=='15')&(L(5)(1)=='2');
177 z=z+foo();
178end
179
180R20=R20&z==3
181
182
183
184//test avec getf
185t=['function foo,//ZZZZ'
186' a=1'
187'endfunction'];
188mputl(t,TMPDIR+'/foo.sci');
189getf(TMPDIR+'/foo.sci')
190L=macr2lst(foo); //getf ignores declaration line comments
191R21=L(4)(1)=='15'&L(5)(1)=='6'&size(L)==9
192clear foo;
193
194
195t=['function foo'
196'//ZZZZ'
197' a=1'
198'endfunction'];
199mputl(t,TMPDIR+'/foo.sci');
200getf(TMPDIR+'/foo.sci')
201L=macr2lst(foo); //getf ignores declaration line comments
202R22=L(4)(1)=='15'&L(5)(1)=='31'&L(6)(1)=='15'&size(L)==11
203clear foo;
204
205R=[R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11,R12,R13,R14,R15,R16,R17,R18,R19,R20,R21,R22]
206affich_result(and(R),1469);
diff --git a/tests/nonRegression/bug1491.sci b/tests/nonRegression/bug1491.sci
deleted file mode 100644
index b469063..0000000
--- a/tests/nonRegression/bug1491.sci
+++ /dev/null
@@ -1,45 +0,0 @@
1// <-- Non-regression test for bug 1491 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1491
5//
6// <-- Short Description -->
7// Bug detected in 3.1.1 under Windows XP.
8// Bug relative to handle Rectangle
9//
10// The default value Axes.clip_box is not inherited in Rectangle.clip_box
11//
12// Jacques-Deric
13
14// Copyright INRIA
15// Scilab Project - Jean-Baptiste Silvy
16// Copyright INRIA 2006
17// Date : 10/02/2006
18
19clipBox = [0.1,0.9,0.8,0.8] ;
20
21a = gca() ;
22a.box = 'on' ;
23// draw the clipping boundaries
24xrect( clipBox(1), clipBox(2), clipBox(3), clipBox(4) ) ;
25r1 = gce() ;
26a.clip_box = clipBox ;
27a.clip_state = 'on' ;
28
29xfrect( 0.0, 0.5, 0.5, 0.5 ) ;
30r2 = gce() ;
31
32xpoly([0,1],[0,1]) ;
33p1 = gce() ;
34
35checkR1 = ( r1.clip_state == 'off' ) ;
36checkR2 = ( r2.clip_state == 'on' ) & ( r2.clip_box == clipBox ) ;
37checkP1 = ( p1.clip_state == 'on' ) & ( p1.clip_box == clipBox ) ;
38
39// check if the clip_box is set for objects wich are
40// created after the axes have been clipped
41if ( checkR1 & checkR2 & checkP1 ) then
42 affich_result(%T,1491);
43else
44 affich_result(%F,1491);
45end
diff --git a/tests/nonRegression/bug1505.sci b/tests/nonRegression/bug1505.sci
deleted file mode 100644
index dbdb6fb..0000000
--- a/tests/nonRegression/bug1505.sci
+++ /dev/null
@@ -1,34 +0,0 @@
1// <-- Non-regression test for bug 1505 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1505
5//
6// <-- Short Description -->
7// datenum does not handle years correctly:
8// example:
9// datenum(1971,1,1) - datenum(1970,1,1)
10// returns 0 on my RedHat Linux x86.
11//
12// However
13// datenum(1971,3,1) - datenum(1970,3,1)
14// gives the expected result : 365.2425
15// (The bug only occur for month = 1 and 2)
16//
17// Fabian
18
19
20// Non-regression test file for bug 1505
21// Copyright INRIA
22// Scilab Project - Pierre MARECHAL
23// Copyright INRIA 2005
24// Date : 28 décembre 2005
25
26test1 = ( (datenum(1971,1,1) - datenum(1970,1,1)) == 365 )
27test2 = ( (datenum(1970,2,1) - datenum(1970,1,1)) == 31 )
28test3 = ( (datenum(1970,1,2) - datenum(1970,1,1)) == 1 )
29
30if ( test1 & test2 & test3 ) then
31 affich_result(%T,1505);
32else
33 affich_result(%F,1505);
34end
diff --git a/tests/nonRegression/bug1506.sci b/tests/nonRegression/bug1506.sci
deleted file mode 100644
index feba0f8..0000000
--- a/tests/nonRegression/bug1506.sci
+++ /dev/null
@@ -1,43 +0,0 @@
1// <-- Non-regression test for bug 1506 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1506
5//
6// <-- Short Description -->
7// datevec(datenum()) gives wrong result.
8//
9// datevec(datenum()) is supposed to give the actual time, right?
10// On my box (Redhat Linux x86) it now gives
11// ! 2005. 7. 27. 15. 10. 50.249993 !
12//
13// where the date on a unix shell gives:
14// Wed Jul 27 12:02:16 CEST 2005
15//
16// So the date is correct but not the time
17//
18// Fabian
19
20// Copyright INRIA
21// Scilab Project - Pierre MARECHAL
22// Copyright INRIA 2005
23// Date : 28 décembre 2005
24
25now = getdate();
26
27one_sec = datenum(now(1),now(2),now(6),now(7),now(8),30) - datenum(now(1),now(2),now(6),now(7),now(8),29);
28one_sec_ref = 1/(3600*24);
29test1 = (abs( (one_sec - one_sec_ref) / one_sec ) < 1e-5);
30
31one_min = datenum(now(1),now(2),now(6),now(7),18,now(9)) - datenum(now(1),now(2),now(6),now(7),17,now(9));
32one_min_ref = 1/(60*24);
33test2 = (abs( (one_min - one_min_ref) / one_min ) < 1e-6);
34
35one_hour = datenum(now(1),now(2),now(6),18,now(8),now(9)) - datenum(now(1),now(2),now(6),17,now(8),now(9));
36one_hour_ref = 1/24;
37test3 = (abs( (one_hour - one_hour_ref) / one_hour ) < 1e-8);
38
39if ( test1 & test2 & test3 ) then
40 affich_result(%T,1506);
41else
42 affich_result(%F,1506);
43end
diff --git a/tests/nonRegression/bug1560.sci b/tests/nonRegression/bug1560.sci
deleted file mode 100644
index c6c6f32..0000000
--- a/tests/nonRegression/bug1560.sci
+++ /dev/null
@@ -1,47 +0,0 @@
1// <-- Non-regression test for bug 1560 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1560
5//
6// <-- Short Description -->
7// (Following of bug 1558)
8// In a 3D representation, under the rotation angles [0,270], the third
9// coordinate z1 of the first point of a segment is ignored, while the
10// third coordinate z2 of the second point is considered.
11//
12// Jacques-Deric
13
14// Copyright INRIA
15// Scilab Project - Jean-Baptiste Silvy
16// Copyright INRIA 2006
17// Date : 11 janvier 2006
18
19hf = scf (1);
20ha = hf.children;
21ha.axes_visible = "on";
22ha.view = "3d";
23ha.box = "on";
24
25xsegs ([0.0,0.0], [1.0,1.0]);
26hs10 = gce ();
27hs10.data (1,1) = 1.00; // x1
28hs10.data (1,2) = 0.60; // y1
29hs10.data (2,1) = 0.70; // x2
30hs10.data (2,2) = 0.45; // y2
31hs10.data,
32
33ha.rotation_angles = [0,270];
34hs10.data (1,3) =-0.30; // z1
35hs10.data (2,3) =-0.40; // z2
36hs10.data,
37
38ha.rotation_angles = [0,0];
39
40reference = [ 1, 0.6, -0.3 ; 0.7, 0.45, -0.4 ] ;
41
42// check that the segment z coordinates are modified
43if ( hs10.data == reference ) then
44 affich_result(%T,1560);
45else
46 affich_result(%F,1560);
47end
diff --git a/tests/nonRegression/bug1566.sci b/tests/nonRegression/bug1566.sci
deleted file mode 100644
index 0dbbd67..0000000
--- a/tests/nonRegression/bug1566.sci
+++ /dev/null
@@ -1,42 +0,0 @@
1// <-- Non-regression test for bug 1566 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1566
5//
6// <-- Short Description -->
7// TCL_SetVar eats imaginary part
8//
9// I know, the man page for TCL_SetVar states that when used with numbers
10// those numbers must be real. However, the following does not throw an
11// error:
12//
13// -->TCL_SetVar("A",1+%i)
14// ans =
15//
16// T
17//
18// I think it should either spit an error, or fully support complex
19// numbers.
20//
21// -->TCL_GetVar("A")
22// ans =
23//
24// 1.0000000000
25//
26// Imaginary part disappeared! This is true for single complex numbers or
27// ...
28
29// Copyright INRIA
30// Scilab Project - Pierre MARECHAL
31// Copyright INRIA 2005
32// Date : 28 octobre 2005
33
34err = execstr('TCL_SetVar(''A'',1+%i)','errcatch');
35
36if (err== 999) then
37 affich_result(%T,1566);
38else
39 affich_result(%F,1566);
40end
41
42lasterror();
diff --git a/tests/nonRegression/bug1568.sci b/tests/nonRegression/bug1568.sci
deleted file mode 100644
index 4ab0089..0000000
--- a/tests/nonRegression/bug1568.sci
+++ /dev/null
@@ -1,43 +0,0 @@
1// <-- Non-regression test for bug 1568 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1568
5//
6// <-- Short Description -->
7// The random number generator grand() does not always produce the same
8// result starting from the same seed, as shown by the following
9// transcript of a Scilab session:
10//
11// $ scilab -nw
12// -------------------------------------------
13// scilab-3.1.1
14//
15// Copyright (c) 1989-2005
16// Consortium Scilab (INRIA, ENPC)
17// -------------------------------------------
18//
19//
20// Startup execution:
21// loading initial environment
22//
23// -->grand('setsd',12)
24//
25// -->grand(1,'prm',[1:5]')
26// ans =
27// ...
28
29// Copyright INRIA
30// Scilab Project - Pierre MARECHAL
31// Copyright INRIA 2005
32// Date : 21 octobre 2005
33
34grand('setsd',12);
35A = grand(1,'prm',[1:5]');
36grand('setsd',12);
37B = grand(1,'prm',[1:5]');
38
39if or(A<>B) then
40 affich_result(%F,1568);
41else
42 affich_result(%T,1568);
43end
diff --git a/tests/nonRegression/bug1586.sci b/tests/nonRegression/bug1586.sci
deleted file mode 100644
index 7cec6c1..0000000
--- a/tests/nonRegression/bug1586.sci
+++ /dev/null
@@ -1,47 +0,0 @@
1// <-- Non-regression test for bug 1586 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1586
5//
6// <-- Short Description -->
7// I have found a possible error in Scilab:
8// when I use the function 'mkdir'.
9// For example:
10//
11// [status,msg]=mkdir('new_1')
12// msg =
13//
14// status =
15// 1.
16//
17// (the result is OK.), but when I use it again (note that the
18// directory "new_1" already exists), then I obtain:
19//
20// [status,msg]=mkdir('new_1')
21//
22// msg=
23// Error : Directory or file D:\progs\scilab-3.1.1\contrib\lrp\example\
24// new_1 already exists.
25// status =
26// 0.
27// ...
28
29// Copyright INRIA
30// Scilab Project - Pierre MARECHAL
31// Copyright INRIA 2005
32// Date : 28 octobre 2005
33
34dirToSave = pwd();
35
36cd(TMPDIR);
37[status,msg]=mkdir('bug1586');
38[status,msg]=mkdir('bug1586');
39
40if( status == 2 )
41 affich_result(%T,1586);
42else
43 affich_result(%F,1586);
44end
45
46rmdir('bug1586');
47cd(dirToSave);
diff --git a/tests/nonRegression/bug1587.sci b/tests/nonRegression/bug1587.sci
deleted file mode 100644
index c88dc35..0000000
--- a/tests/nonRegression/bug1587.sci
+++ /dev/null
@@ -1,40 +0,0 @@
1// <-- Non-regression test for bug 1587 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1587
5//
6// <-- Short Description -->
7// Changing the colormap with the graphic editor of a not selected figure do not
8// modify the colormap as expected. The colormap of the figure which should be
9// modified is not the entered one. The selected figure colormap is also changed
10// with the entered colormap. Moreover, Scilab often crash some time after this bug
11// occures.
12
13// Copyright INRIA
14// Scilab Project - Jean-Baptiste Silvy
15// Copyright INRIA 2006
16// Date : 18 Juillet 2006
17
18// test the modification on a figure which is not current
19f1 = gcf() ;
20plot3d ;
21
22f2 = scf() ;
23hc = jetcolormap(21) ;
24f2.color_map = hc ;
25plot3d ;
26
27// change the colormap of the first window
28jc = jetcolormap(45) ;
29f.color_map = jc ;
30
31// check that the colormaps are well copied
32if abs( max( f.color_map - jc ) ) > 1e-8 then
33 affich_result(%F,1587) ;
34end ;
35
36if abs( max( f2.color_map - hc ) ) > 1e-8 then
37 affich_result(%F,1587) ;
38end ;
39
40affich_result(%T,1587) ;