summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPierre Marechal <pierre.marechal@scilab.org>2007-11-27 10:44:01 +0000
committerPierre Marechal <pierre.marechal@scilab.org>2007-11-27 10:44:01 +0000
commit04c4a69903e499c034510bcde1d5611ec07424f9 (patch)
treed10466f8e67705c97f73d85c5265dd635d5f0ee4 /tests
parente582dd8e9a3881919acc42f875d5bfbefe864a11 (diff)
downloadscilab-04c4a69903e499c034510bcde1d5611ec07424f9.zip
scilab-04c4a69903e499c034510bcde1d5611ec07424f9.tar.gz
Incoporate non-regression test files in the scilab source tree
Diffstat (limited to 'tests')
-rw-r--r--tests/nonRegression/bug1784.sci25
-rw-r--r--tests/nonRegression/bug2284.sci31
-rw-r--r--tests/nonRegression/bug2322.sci22
-rw-r--r--tests/nonRegression/bug2330.sci33
-rw-r--r--tests/nonRegression/bug2344.sci42
-rw-r--r--tests/nonRegression/bug2362.sci22
-rw-r--r--tests/nonRegression/bug2396.sci23
-rw-r--r--tests/nonRegression/bug2399.sci21
-rw-r--r--tests/nonRegression/bug2407.sci33
-rw-r--r--tests/nonRegression/bug2410.sci21
-rw-r--r--tests/nonRegression/bug2414.sci21
-rw-r--r--tests/nonRegression/bug2420.sci19
-rw-r--r--tests/nonRegression/bug2421.sci16
-rw-r--r--tests/nonRegression/bug2429.sci21
-rw-r--r--tests/nonRegression/bug2430.sci23
-rw-r--r--tests/nonRegression/bug2435.sci25
-rw-r--r--tests/nonRegression/bug2453.sci19
-rw-r--r--tests/nonRegression/bug2467.sci23
-rw-r--r--tests/nonRegression/bug2616.sci62
-rw-r--r--tests/nonRegression/bug461.sci47
-rw-r--r--tests/nonRegression/bug464.sci27
-rw-r--r--tests/nonRegression/bug467.sci34
-rwxr-xr-xtests/nonRegression/bug467.wavbin102012 -> 0 bytes
-rw-r--r--tests/nonRegression/bug470.sci8
-rw-r--r--tests/nonRegression/bug474.sci41
-rw-r--r--tests/nonRegression/bug475.sci33
-rw-r--r--tests/nonRegression/bug476.sci34
-rw-r--r--tests/nonRegression/bug477.sci38
-rw-r--r--tests/nonRegression/bug480.sci30
-rw-r--r--tests/nonRegression/bug487.sci37
30 files changed, 5 insertions, 826 deletions
diff --git a/tests/nonRegression/bug1784.sci b/tests/nonRegression/bug1784.sci
deleted file mode 100644
index 9bb8370..0000000
--- a/tests/nonRegression/bug1784.sci
+++ /dev/null
@@ -1,25 +0,0 @@
1// <-- Non-regression test for bug 1784 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1784
5//
6// <-- Short Description -->
7// Problem while inserting a matrix in an N-D matrix
8
9// Copyright INRIA
10// Scilab Project - Serge Steer
11// Copyright INRIA 2005
12// Date : 23 janvier 2006
13
14A=hypermat([3,3,2]);
15try
16 A(1,1:3,1:3)=[1 2 3;4 5 6;7 8 9];
17 ok=%t
18catch
19 ok=%f
20end
21if ok then
22 ok=and(A==hypermat([3,3,3],[1;0;0;4;0;0;7;0;0;2;0;0;5;0;0;8;0;0;3;0;0; ...
23 6;0;0;9;0;0]))
24end
25affich_result(ok,1784);
diff --git a/tests/nonRegression/bug2284.sci b/tests/nonRegression/bug2284.sci
deleted file mode 100644
index 3aeee5f..0000000
--- a/tests/nonRegression/bug2284.sci
+++ /dev/null
@@ -1,31 +0,0 @@
1// <-- Non-regression test for bug 2284 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2284
5//
6// <-- Short Description -->
7// Numerical error when carrying out a particular calculation using the
8// complex exp function. E.g.
9//
10// -->20 * exp(%i * 2 * %pi / 3)
11// ans =
12//
13// -11. + 17.320508i
14//
15// This is the wrong result!!
16
17
18// Copyright INRIA
19// Scilab Project - S. Steer
20// Copyright INRIA
21// Date : 17 Janv 2007
22
23s1=-9.999999999;
24s2=0.999999999999;
25
26print(TMPDIR+'/bug2284',s1,s2)
27txt=mgetl(TMPDIR+'/bug2284')
28r=and(txt== [" s2 =";" ";" 1. ";" s1 =";" ";" -10. "])
29mdelete(TMPDIR+'/bug2284')
30
31affich_result(r,2284);
diff --git a/tests/nonRegression/bug2322.sci b/tests/nonRegression/bug2322.sci
deleted file mode 100644
index a516294..0000000
--- a/tests/nonRegression/bug2322.sci
+++ /dev/null
@@ -1,22 +0,0 @@
1// <-- Non-regression test for bug 2322 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2322
5//
6// <-- Short Description -->
7// emptystr(0,1) returns an empty matrix of size 0 x 1 which is not coherent with
8// current empty matrix managment.
9
10// Serge Steer - Scilab Project
11// Copyright INRIA
12// 19/02/2007
13
14r=%t
15r=r&and(size(emptystr(0,1))==[0 0]);
16r=r&and(size(emptystr(1,0))==[0 0]);
17r=r&and(size(emptystr(0,3))==[0 0]);
18r=r&and(size(emptystr(5,0))==[0 0]);
19r=r&and(size(emptystr(0,0))==[0 0]);
20r=r&and(size(emptystr(3,5))==[3 5]);
21
22affich_result(r,2322);
diff --git a/tests/nonRegression/bug2330.sci b/tests/nonRegression/bug2330.sci
deleted file mode 100644
index 9055609..0000000
--- a/tests/nonRegression/bug2330.sci
+++ /dev/null
@@ -1,33 +0,0 @@
1// <-- Non-regression test for bug 2330 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2330
5//
6// <-- Short Description -->
7// datafit does not work equivalently on WinXP and Linux. With a given dataset and
8// same routines centered on datafit function, it works perfectly on Linux and
9// partially (some data are fitted some others not) on WinXP.
10
11
12// Serge Steer - Scilab Project
13// Copyright INRIA
14// 30 apr 2007
15
16//build the data to fit
17//---------------------
18function Xcalc=biexp(p,t)
19 Xcalc=p(1).*exp(-p(2).*t)+p(3).*exp(-p(4).*t)+p(5);
20endfunction;
21t=(0:100:36000)';
22p=[0.1;0.0001;0.2;0.0002;0.3];
23X=biexp(p,t);
24
25//try to fit the data
26//-------------------
27//the error function
28function e=myerf(p,X,t),e=X-biexp(p,t),endfunction
29// the initial point
30p0=[0.01;0.001;0.01;0.001;0.1];
31//call datafit
32[pr,err]=datafit(list(myerf,t),X,p0);
33affich_result(err<5d-6,2330);
diff --git a/tests/nonRegression/bug2344.sci b/tests/nonRegression/bug2344.sci
deleted file mode 100644
index 7ae197a..0000000
--- a/tests/nonRegression/bug2344.sci
+++ /dev/null
@@ -1,42 +0,0 @@
1// <-- Non-regression test for bug 2344 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2344
5//
6// <-- Short Description -->
7// dassl interface bug with the info parameter
8//
9// Whenever a non default info parameter is given to dassl, a wrong error
10// pops up.
11//
12// This has been reported first in the Scilab newsgroup:
13//
14// http://groups.google.com/group/comp.soft-
15// sys.math.scilab/browse_frm/thread/ad556ab9e14f3005/c20f3f4f6031f338
16//
17// Francois
18
19// Author : Francois Vogel
20// Date : 16 March 2007
21//
22// Extracted and expanded from dassldasrt.tst
23
24//X1DOT + 10.0*X1 = 0
25//X1 + X2 = 1
26//X1(0) = 1.0, X2(0) = 0.0
27
28t=1:10;t0=0;y0=[1;0];y0d=[-10;0];
29info=list([],0,[],[],[],0,0);
30deff('[r,ires]=dres1(t,y,ydot)','r=[ydot(1)+10*y(1);y(2)+y(1)-1];ires=0')
31
32ml = 1; mu = 1;
33info(3)=[ml,mu];
34
35execstr("yy0=dassl([y0,y0d],t0,t,dres1,info);","errcatch")
36error_str = lasterror();
37
38if and(error_str == []) then
39 affich_result(%T,2344); // No regression
40else
41 affich_result(%F,2344); // Bug 2344 re-appeared!!
42end
diff --git a/tests/nonRegression/bug2362.sci b/tests/nonRegression/bug2362.sci
deleted file mode 100644
index 08827df..0000000
--- a/tests/nonRegression/bug2362.sci
+++ /dev/null
@@ -1,22 +0,0 @@
1// <-- Non-regression test for bug 2362 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2362
5//
6// <-- Short Description -->
7// plot3d3 crash
8//
9// plot3d3([0,0;10,10],[5,3;5,5],[0,2;0,2]);
10//
11// badaboom!
12//
13// Francois
14
15// Copyright INRIA
16// Scilab Project - Jean-Baptiste Silvy
17// Copyright INRIA 2007
18// Date : 5 avril 2007
19
20// crashed before the bug fix
21plot3d3([0,0;10,10],[5,3;5,5],[0,2;0,2]);
22affich_result(%T,2362);
diff --git a/tests/nonRegression/bug2396.sci b/tests/nonRegression/bug2396.sci
deleted file mode 100644
index 7306910..0000000
--- a/tests/nonRegression/bug2396.sci
+++ /dev/null
@@ -1,23 +0,0 @@
1// <-- Non-regression test for bug 2396 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2396
5//
6// <-- Short Description -->
7// Scilab crashes on call to feval. I might have defined a weird function
8// to be feval'ed, but scilab should not crash. The steps to reproduce the
9// bug cause scilab to hang with the error message below, I have to kill
10// it.
11//
12// Matthias
13
14// Serge Steer - Scilab Project
15// Copyright INRIA
16// 14 may 2007
17
18a1 = [1 2 3]
19a2 = [1 3 4 5 1 6 7]
20function y=elfind(x),y = (find(a2 == x) ~= []),endfunction
21T=execstr('z=feval(a1,elfind)','errcatch')==98
22
23affich_result(T,2396);
diff --git a/tests/nonRegression/bug2399.sci b/tests/nonRegression/bug2399.sci
deleted file mode 100644
index 48f1010..0000000
--- a/tests/nonRegression/bug2399.sci
+++ /dev/null
@@ -1,21 +0,0 @@
1// <-- Non-regression test for bug 2399 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2399
5//
6// <-- Short Description -->
7// msscanf crashes scilab when scanning a vector of strings for float
8// values on Linux.
9
10// Author : Scilab Project - Pierre MARECHAL
11// Copyright INRIA
12// Date : 05 mai 2007
13
14toks = ['noddy';'holden'];
15vals = msscanf(-1,toks,'%f');
16
17if( vals == [] ) then
18 affich_result(%T,2399);
19else
20 affich_result(%F,2399);
21end
diff --git a/tests/nonRegression/bug2407.sci b/tests/nonRegression/bug2407.sci
deleted file mode 100644
index e7bce7f..0000000
--- a/tests/nonRegression/bug2407.sci
+++ /dev/null
@@ -1,33 +0,0 @@
1// <-- Non-regression test for bug 2407 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2407
5//
6// <-- Short Description -->
7// stdev and st_deviation are not available for hypermatrix.
8//
9// When trying to calculate stdev of an hypermatrix, an error occurs
10// systematically. The stdev of an hypermatrix should be managed by the %
11// hm_st_deviation function in Scilab.
12// After a quick look at the code of this function, i think i've
13// understood the origin of the bug. There is a mix between two variables :
14// N and d.
15// For example, at line 8, instruction "p1=prod(dims(1:d-1));" should be
16// replace by p1=prod(dims(1:N-1));
17// I think that the replacement of d by N in all the function could solve
18// the problem.
19//
20// Regards.
21
22// Author : Scilab Project - Pierre MARECHAL
23// Copyright INRIA
24// Date : 05 mai 2007
25
26a = zeros(3,3,3);
27b = stdev(a);
28
29if( b == 0 ) then
30 affich_result(%T,2407);
31else
32 affich_result(%F,2407);
33end
diff --git a/tests/nonRegression/bug2410.sci b/tests/nonRegression/bug2410.sci
deleted file mode 100644
index b9f5c98..0000000
--- a/tests/nonRegression/bug2410.sci
+++ /dev/null
@@ -1,21 +0,0 @@
1// <-- Non-regression test for bug 2410 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2410
5//
6// <-- Short Description -->
7// string(boolean array) is incredibly slow
8
9// Author : Scilab Project - Pierre MARECHAL
10// Copyright INRIA
11// Date : 05 mai 2007
12
13tic();
14string(zeros(1,10000)==1);
15a = toc();
16
17if( a < 0.1 ) then
18 affich_result(%T,2410);
19else
20 affich_result(%F,2410);
21end
diff --git a/tests/nonRegression/bug2414.sci b/tests/nonRegression/bug2414.sci
deleted file mode 100644
index 01cca68..0000000
--- a/tests/nonRegression/bug2414.sci
+++ /dev/null
@@ -1,21 +0,0 @@
1// <-- Non-regression test for bug 2414 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2414
5//
6// <-- Short Description -->
7// assignment of empty string an empty variable has disastrous results. Probably a
8// parser bug, for statements of the form a=string(a), with a=[]
9
10// Author : Scilab Project - Pierre MARECHAL
11// Copyright INRIA
12// Date : 05 mai 2007
13
14a=[];
15a = string(a);
16
17if( (type(a) == 1) & (typeof(a) == "constant") & and(size(a) == [0 0]) & (a($,1)==[]) ) then
18 affich_result(%T,2414);
19else
20 affich_result(%F,2414);
21end
diff --git a/tests/nonRegression/bug2420.sci b/tests/nonRegression/bug2420.sci
deleted file mode 100644
index c79ea05..0000000
--- a/tests/nonRegression/bug2420.sci
+++ /dev/null
@@ -1,19 +0,0 @@
1// <-- Non-regression test for bug 2420 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2420
5//
6// <-- Short Description -->
7// fun2string converts the sequence \@ as carriage return
8
9
10// Scilab Project - Serge Steer
11// Copyright INRIA 2007
12// Date : June 2007
13
14BugNumber=2420;
15function a=strudel(),a='+\@+';endfunction
16t=fun2string(strudel)
17T=stripblanks(t(2))=="a = ''+\@+'';"
18affich_result(T,BugNumber) ;
19
diff --git a/tests/nonRegression/bug2421.sci b/tests/nonRegression/bug2421.sci
deleted file mode 100644
index a0f5997..0000000
--- a/tests/nonRegression/bug2421.sci
+++ /dev/null
@@ -1,16 +0,0 @@
1// <-- Non-regression test for bug 2421 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2421
5//
6// <-- Short Description -->
7// colon (all elements) assignment from output arguments of a function beyond the
8// first not possible
9
10// Scilab Project - Serge Steer
11// Copyright INRIA 2007
12// Date : June 2007
13
14BugNumber=2421
15T=execstr('[a(:), v(1)] = (1, 2)','errcatch')==0
16affich_result(T,BugNumber) ;
diff --git a/tests/nonRegression/bug2429.sci b/tests/nonRegression/bug2429.sci
deleted file mode 100644
index e3799b0..0000000
--- a/tests/nonRegression/bug2429.sci
+++ /dev/null
@@ -1,21 +0,0 @@
1// <-- Non-regression test for bug 2429 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2429
5//
6// <-- Short Description -->
7// Implicit vector in for loop are allocated
8
9// Copyright INRIA
10// Scilab Project - Serge Steer
11// Copyright INRIA 2007
12// Date : June 2007
13
14S=stacksize();
15function test(),for k=1:2d5,end,endfunction
16
17stacksize(1d5)
18
19ierr=execstr('test()','errcatch')
20stacksize(S(1))
21affich_result(ierr==0,2429) ;
diff --git a/tests/nonRegression/bug2430.sci b/tests/nonRegression/bug2430.sci
deleted file mode 100644
index 5567a07..0000000
--- a/tests/nonRegression/bug2430.sci
+++ /dev/null
@@ -1,23 +0,0 @@
1// <-- Non-regression test for bug 2430 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2430
5//
6// <-- Short Description -->
7// Wrong results when solving linear systems when the matrix
8// is sparse and 1x1, and rhs is compatible and sparse.
9// In the example below, M\b and full(M)\b give a wrong result,
10// whereas M\full(b) and full(M)\full(b) are ok.
11//
12// Strangely, when the size of b is less than 10, then all
13// cases give the correct answer !
14
15
16// Scilab Project - Serge Steer
17// Copyright INRIA 2007
18// Date : June 2007
19
20BugNumber=2430
21b=sparse(1:16);
22T=and(abs(full(2\b)-2\full(b))<100*%eps);
23affich_result(T,BugNumber) ;
diff --git a/tests/nonRegression/bug2435.sci b/tests/nonRegression/bug2435.sci
deleted file mode 100644
index 2f81d76..0000000
--- a/tests/nonRegression/bug2435.sci
+++ /dev/null
@@ -1,25 +0,0 @@
1// <-- Non-regression test for bug 2435 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2435
5//
6// <-- Short Description -->
7// The following "optim based" function mades scilab hangs
8
9
10// Scilab Project - Serge Steer
11// Copyright INRIA 2007
12// Date : June 2007
13
14BugNumber=2435;
15
16function [f,g,ind]=cost(x,ind)
17 xref=[1;2;3];
18 f=0.5*norm(x-xref)^2
19 g=x-xref;
20endfunction
21
22x0=[1;-1;1];
23T=execstr('[f,xopt]=optim(cost,,''b'',-2*ones(x0),2*ones(x0),x0);','errcatch')==54
24
25affich_result(T,BugNumber) ;
diff --git a/tests/nonRegression/bug2453.sci b/tests/nonRegression/bug2453.sci
deleted file mode 100644
index f94647d..0000000
--- a/tests/nonRegression/bug2453.sci
+++ /dev/null
@@ -1,19 +0,0 @@
1// <-- Non-regression test for bug 2453 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2453
5//
6// <-- Short Description -->
7// mfscanf and probably the other variants msscanf mscanf may crash Scilab when
8// first argument is -1 (any number of lines)
9
10
11// Scilab Project - Serge Steer
12// Copyright INRIA 2007
13// Date : Aug 2007
14
15BugNumber=2453;
16fd=mopen('bug2453.dat','r');
17Lx=mfscanf(-1,fd,'%g %g\n');mclose(fd);
18T=size(Lx,1)==40000;
19affich_result(T,BugNumber) ;
diff --git a/tests/nonRegression/bug2467.sci b/tests/nonRegression/bug2467.sci
deleted file mode 100644
index 8a1202f..0000000
--- a/tests/nonRegression/bug2467.sci
+++ /dev/null
@@ -1,23 +0,0 @@
1// <-- Non-regression test for bug 2467 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2467
5//
6// <-- Short Description -->
7// when trying to open plot files (scg) containing graphs with
8// logarithmic axes, I get this mysterious error message..
9
10
11// Scilab Project - Serge Steer
12// Copyright INRIA 2007
13// Date : Sept 2007
14
15BugNumber=2467
16plot(1:10)
17a=gca();a.log_flags='lnn';
18path=TMPDIR+'/bug2467.scg'
19xsave(path)
20clf();
21T=execstr("xload(path)",'errcatch')==0
22
23affich_result(T,BugNumber) ;
diff --git a/tests/nonRegression/bug2616.sci b/tests/nonRegression/bug2616.sci
deleted file mode 100644
index 471960d..0000000
--- a/tests/nonRegression/bug2616.sci
+++ /dev/null
@@ -1,62 +0,0 @@
1// <-- Non-regression test for bug 2616 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2616
5//
6// <-- Short Description -->
7// "eye variable undefined in this context" wrongly reported when a loop range is
8// defined concatenating ranges, inside a function
9
10
11// Scilab Project - Serge Steer
12// Copyright INRIA 2007
13// Date : June 2007
14
15BugNumber=2616;
16T=[];
17//simple case uncompiled
18s=0;for k=1:3,s=s+1;end
19T=[T,s<>3];
20
21
22s=0;for k=(1:3)+1,s=s+1;end
23T=[T,s<>3];
24
25s=0;for k=[(1:3) 1],s=s+1;end
26T=[T,s<>4];
27
28function s=foo(),s=0;for k=1:3,s=s+1;end,endfunction
29T=[T,foo()<>3];
30
31function s=foo(),s=0;for k=(1:3)+1,s=s+1;end,endfunction
32T=[T,foo()<>3];
33
34function s=foo(),s=0;for k=[(1:3) 1],s=s+1;end,endfunction
35T=[T,foo()<>4];
36
37//check if implicit vector is created or not
38old=stacksize();
39stacksize(180000)
40
41//should evaluate
42ierr=execstr('s=0;for k=1:200000,s=s+1;end','errcatch')
43T=[T,ierr<>0|s<>200000];
44
45//should produce a stacksize error
46ierr=execstr('s=0;for k=(1:200000)+1,s=s+1;end','errcatch')
47T=[T,ierr<>17];
48
49ierr=execstr('s=0;for k=[(1:200000) 1],s=s+1;end','errcatch')
50T=[T,ierr<>17];
51
52function s=foo(),s=0;for k=1:200000,s=s+1;end,endfunction
53ierr=execstr('s=foo();','errcatch');
54T=[T,ierr<>0|s<>200000];
55
56
57function s=foo(),s=0;for k=1+(1:200000),s=s+1;end,endfunction
58ierr=execstr('s=foo();','errcatch');
59T=[T,ierr<>17];
60stacksize(old(1))
61
62affich_result(and(~T),BugNumber) ;
diff --git a/tests/nonRegression/bug461.sci b/tests/nonRegression/bug461.sci
deleted file mode 100644
index a8dc8e7..0000000
--- a/tests/nonRegression/bug461.sci
+++ /dev/null
@@ -1,47 +0,0 @@
1// <-- Non-regression test for bug 461 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=461
5//
6// <-- Short Description -->
7// Bug Report Id: 11985200361815216
8// Result of following operations:
9// size(s0)
10// ans =
11// ! 1. 43. !
12//
13// size(s1) // and for s2 and s3
14// ans =
15// ! 43. 1. !
16// s0 is vector-row and s1, s2 s3- vector-colum
17//
18//
19// On Scilab 2.7 with " interp " function
20// The Error Messages are:
21// !--error 5
22// inconsistent column/row dimensions
23// Commands: x=[0. 1.01 2.01 3. 4.02];
24// f=[0. 1. 3.9 8.75 16.5];
25// plot(x,f);
26// d=splin(x,f );
27// ...
28
29correct=%F;
30x=[0. 1.01 2.01 3. 4.02];
31f=[0. 1. 3.9 8.75 16.5];
32plot(x,f);
33d=splin(x,f );
34xx=0:0.1:4.2;
35[s0,s1,s2,s3]=interp(xx,x,f,d);
36s0=s0';
37s1=s1';
38s2=s2';
39s3=s3';
40result=execstr("plot2d(xx,[s0 s1 s2 s3])","errcatch","n");
41xdel();
42
43if result==0 then
44 affich_result(%T,461);
45else
46 affich_result(%F,461);
47end
diff --git a/tests/nonRegression/bug464.sci b/tests/nonRegression/bug464.sci
deleted file mode 100644
index 574d71b..0000000
--- a/tests/nonRegression/bug464.sci
+++ /dev/null
@@ -1,27 +0,0 @@
1// <-- Non-regression test for bug 464 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=464
5//
6// <-- Short Description -->
7// Bug Report Id: 12011200362191319
8// "1" is a double, and inttype is not defined for a double argument, according to the help. However, the error message is confusing; moreover, imho, it would be proper for inttype(double) to return 0, so as to be fully compatible with iconvert().
9//
10// On Scilab CVS with " inttype " function
11// The Error Messages are:
12// -->inttype(1)
13// !--error 44
14// ***th argument is incorrect
15//
16// Commands:
17//
18// Enrico Segre on Linux version RH 9 distribution RH 9 with gnome as window manager
19// Israel July 21, 2003 at 9:13:19
20
21
22correct=%F
23result=execstr("inttype(1)","errcatch","n")
24if result == 0 then
25 correct=(inttype(1)==0)
26end
27affich_result(correct, 464)
diff --git a/tests/nonRegression/bug467.sci b/tests/nonRegression/bug467.sci
deleted file mode 100644
index 44d66bb..0000000
--- a/tests/nonRegression/bug467.sci
+++ /dev/null
@@ -1,34 +0,0 @@
1// <-- Non-regression test for bug 467 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=467
5//
6// <-- Short Description -->
7// Bug Report Id: 12022200362265140
8// If you don't mind, where are read_dat_pcm or read_wavedat?
9//
10//
11//
12// On Scilab 2-7 with " wavread " function
13// The Error Messages are:
14// !--error 4
15// undefined variable : erro
16// at line 26 of function read_dat_pcm called by :
17// line 6 of function read_wavedat called by :
18// line 93 of function wavread called by :
19// [x,y] = wavread('c:\b.wav','size');
20//
21//
22// !--error 246
23// function not defined for given argument type(s)
24// Check arguments or define function %s_convstr for overloading
25// at line 28 of function wavread called by :
26// z = wavread('c:\b.wav',100000);
27// ...
28
29correct=%F
30result=execstr("[x,y] = wavread(''bug467.wav'',''size'')","errcatch","n")
31if result == 0 then
32 result=execstr("z = wavread(""bug467.wav"",10)","errcatch","n")
33end
34affich_result(result==0, 467)
diff --git a/tests/nonRegression/bug467.wav b/tests/nonRegression/bug467.wav
deleted file mode 100755
index a8b529e..0000000
--- a/tests/nonRegression/bug467.wav
+++ /dev/null
Binary files differ
diff --git a/tests/nonRegression/bug470.sci b/tests/nonRegression/bug470.sci
index 0482171..9086c38 100644
--- a/tests/nonRegression/bug470.sci
+++ b/tests/nonRegression/bug470.sci
@@ -20,8 +20,10 @@
20// Israel July 24, 2003 at 16:21:35 20// Israel July 24, 2003 at 16:21:35
21 21
22 22
23result=execstr("a=int8(ones(2,2))","errcatch","n") 23result = execstr("a=int8(ones(2,2))","errcatch","n");
24
25if result <> 0 then pause,end
26
24if result == 0 then 27if result == 0 then
25 result=execstr("a(1,1)=uint8(2)","errcatch","n") 28 if execstr("a(1,1)=uint8(2)","errcatch","n") <> 0 then pause,end
26end 29end
27affich_result(result==0, 470)
diff --git a/tests/nonRegression/bug474.sci b/tests/nonRegression/bug474.sci
deleted file mode 100644
index 6813ec3..0000000
--- a/tests/nonRegression/bug474.sci
+++ /dev/null
@@ -1,41 +0,0 @@
1// <-- Non-regression test for bug 474 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=474
5//
6// <-- Short Description -->
7// Bug Report Id: 120442003624174827
8// k should be a 2 element vector!! like
9//
10// -->a=matrix(1:9,3,3); [m,k]=min(a)
11// k =
12//
13// ! 1. 1. !
14// m =
15//
16// 1.
17//
18// -->a=matrix(1:9,3,3); [m,k]=max(a)
19// k =
20//
21// ! 3. 3. !
22// m =
23//
24// 9.
25//
26//
27// ...
28
29//correct=%F
30a=matrix(1:9,3,3)
31[mia,kia]=min(a)
32[maa,kaa]=max(a)
33
34b=int16(matrix(1:9,3,3))
35[mib,kib]=min(b)
36[mab,kab]=max(b)
37
38affich_result(mia==mib, 474.1)
39affich_result(and(kia==kib), 474.2)
40affich_result(maa==mab, 474.3)
41affich_result(and(kaa==kab), 474.4)
diff --git a/tests/nonRegression/bug475.sci b/tests/nonRegression/bug475.sci
deleted file mode 100644
index 239b3c9..0000000
--- a/tests/nonRegression/bug475.sci
+++ /dev/null
@@ -1,33 +0,0 @@
1// <-- Non-regression test for bug 475 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=475
5//
6// <-- Short Description -->
7// Bug Report Id: 120442003624175150
8// m=min(a) and m=max(a) give correct results
9//
10//
11// On Scilab CVS with " min(), max() " function
12// The Error Messages are:
13// !--error 59
14// incorrect # of outputs in the function
15// arguments are :
16// x
17//
18// Commands: a=hypermat([3,3,1],uint16(1:9)); [m,k]=max(a)
19//
20// or
21//
22// a=hypermat([3,3,1],uint16(1:9)); [m,k]=min(a)
23//
24// Enrico Segre on Linux version RH9 distribution with gnome as window manager
25// Israel July 24, 2003 at 17:51:50
26
27//correct=%F
28a=hypermat([3,3,1],uint16(1:9))
29result=execstr("[m,k]=max(a)","errcatch","n")
30if result == 0 then
31 result=execstr("[m,k]=min(a)","errcatch","n")
32end
33affich_result(result==0, 475)
diff --git a/tests/nonRegression/bug476.sci b/tests/nonRegression/bug476.sci
deleted file mode 100644
index 2081034..0000000
--- a/tests/nonRegression/bug476.sci
+++ /dev/null
@@ -1,34 +0,0 @@
1// <-- Non-regression test for bug 476 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=476
5//
6// <-- Short Description -->
7// Bug Report Id: 120442003624185651
8//
9//
10// On Scilab CVS with " %hm_find " function
11// The Error Messages are:
12// wrong result
13// Commands: -->a=hypermat([3,3,1],int8(1:9));
14//
15// -->[i,j]=find(a==5)
16// j =
17//
18// 1.
19// i =
20//
21// 0.
22//
23// -->[i,j,k]=find(a==5)
24// k =
25//
26// 1.
27// ...
28
29//correct=%F
30a=hypermat([3,3,1],int8(1:9))
31[i,j]=find(a==5)
32[k,l,m]=find(a==5)
33
34affich_result((m==1)&((i==k)==(j==l)), 476)
diff --git a/tests/nonRegression/bug477.sci b/tests/nonRegression/bug477.sci
deleted file mode 100644
index 5e6cc72..0000000
--- a/tests/nonRegression/bug477.sci
+++ /dev/null
@@ -1,38 +0,0 @@
1// <-- Non-regression test for bug 477 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=477
5//
6// <-- Short Description -->
7// Bug Report Id: 12044200362419444
8// %hm_maxi and %hm_mini are indeed currently defined with a _single_ return argument. IMHO they should be extended analogously to max, min and %hm_find, returning optionally either a vector of indices of the max/min.
9//
10// On Scilab CVS with " %hm_maxi, %hm_mini " function
11// The Error Messages are:
12// -->a=hypermat([3,3,1],1:9);
13//
14// -->[m]=max(a)
15// i =
16//
17// 9.
18//
19// -->[m,i]=max(a)
20// !--error 59
21// incorrect # of outputs in the function
22// arguments are :
23// x
24//
25// -->[m,i,j,k]=max(a)
26// !--error 78
27// ...
28
29
30correct=%F
31a=hypermat([3,3,1],1:9)
32[m]=max(a)
33result2=execstr("[n,i]=max(a)","errcatch","n")
34if result2==0 then
35 result3=execstr("[m,i,j,k]=max(a)","errcatch","n")
36 correct = ((m==n)&(result2==0)&(and(i==[3,3,1]))&(result3==78))
37end
38affich_result(correct, 477)
diff --git a/tests/nonRegression/bug480.sci b/tests/nonRegression/bug480.sci
deleted file mode 100644
index 8f8dd6d..0000000
--- a/tests/nonRegression/bug480.sci
+++ /dev/null
@@ -1,30 +0,0 @@
1// <-- Non-regression test for bug 480 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=480
5//
6// <-- Short Description -->
7// Bug Report Id: 12070200362710754
8// [u]intN() and iconvert() do not handle hypermatrices. It would be nice if they would.
9// There is a workaround -
10// hypermat(a.dims,int8(a.entries)) - but it is somehow a detour.
11//
12// On Scilab CVS with " intN(), iconvert() " function
13// The Error Messages are:
14// -->a=hypermat([3,3,1],1:9);
15//
16// -->int8(a)
17// !--error 53
18// invalid input (waiting for real or complex matrix)
19//
20// Commands:
21//
22// Enrico Segre on Linux version distribution RH9 with as window manager
23// Israel July 27, 2003 at 10:7:54
24
25a=hypermat([3,3,1],1:9)
26result = execstr("int8(a)","errcatch","n")
27if result == 0 then
28 toto = (hypermat(a.dims,int8(a.entries)) == int8(a))
29end
30affich_result(and(toto(:,:,1)), 480)
diff --git a/tests/nonRegression/bug487.sci b/tests/nonRegression/bug487.sci
deleted file mode 100644
index 08ab7a9..0000000
--- a/tests/nonRegression/bug487.sci
+++ /dev/null
@@ -1,37 +0,0 @@
1// <-- Non-regression test for bug 487 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=487
5//
6// <-- Short Description -->
7// Bug Report Id: 12195200378121313
8// According to the manual of "contour2d" a vector instead of a scalar should also be possible for the level values of the contourplot. But scilab-2.7 gives me an error.
9//
10// I must admit that I am not an experienced user concerning scilab. Maybe I have someting overseen, but I don't known what.
11//
12// Could you please help me?
13//
14// On Scilab 2.7 with " contour2d " function
15// The Error Messages are:
16// !--error 204
17// Argument 2, wrong type argument: expecting a scalar
18// at line 3 of function contour2d called by :
19// contour2d(rhogit,zgit,Jv, lvl, strf="041");
20//
21// Commands: lvl in contour2d is a vector
22//
23// lvl= -0.0003 + (1:10)*(0.0003-(-0.0003))/(10+1)
24//
25//
26// Kappen on Linux version 2.4 distribution Debian woody with gnome1.4 Sawfish as window manager
27// ...
28
29lvl= -0.0003 + (1:10)*(0.0003-(-0.0003))/(10+1)
30result=execstr("contour2d(1:10,1:10,rand(10,10),lvl,rect=[0,0,11,11])","errcatch","n")
31xdel()
32
33if result==0 then
34 affich_result(%T,487);
35else
36 affich_result(%F,487);
37end