summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPierre Marechal <pierre.marechal@scilab.org>2007-11-27 09:42:56 +0000
committerPierre Marechal <pierre.marechal@scilab.org>2007-11-27 09:42:56 +0000
commit395d412dc11faa19aeb716180766113d8b1eeb09 (patch)
tree75fc243114900ec1d2daf5454bd15881b8bababf /tests
parentd382090d24ed2a6e2c92797ce1c2e9bdaa52bbcd (diff)
downloadscilab-395d412dc11faa19aeb716180766113d8b1eeb09.zip
scilab-395d412dc11faa19aeb716180766113d8b1eeb09.tar.gz
Incoporate non-regression test files in the scilab source tree
Diffstat (limited to 'tests')
-rw-r--r--tests/nonRegression/bug1786.sci40
-rw-r--r--tests/nonRegression/bug1787.sci37
-rw-r--r--tests/nonRegression/bug1794.sci34
-rw-r--r--tests/nonRegression/bug1802.sci18
-rw-r--r--tests/nonRegression/bug1859.sci45
-rw-r--r--tests/nonRegression/bug1867.sci59
-rw-r--r--tests/nonRegression/bug1902.sci71
-rw-r--r--tests/nonRegression/bug1933.sci22
-rw-r--r--tests/nonRegression/bug1955.sci21
-rw-r--r--tests/nonRegression/bug1956.sci31
-rw-r--r--tests/nonRegression/bug1957.sci64
-rw-r--r--tests/nonRegression/bug1977.sci28
-rw-r--r--tests/nonRegression/bug1979.sci29
-rw-r--r--tests/nonRegression/bug1991.sci24
-rw-r--r--tests/nonRegression/bug2014.sci36
-rw-r--r--tests/nonRegression/bug2022.sci31
-rw-r--r--tests/nonRegression/bug2038.sci45
-rw-r--r--tests/nonRegression/bug2039.sci37
-rw-r--r--tests/nonRegression/bug2045.sci70
-rw-r--r--tests/nonRegression/bug205.sci38
-rw-r--r--tests/nonRegression/bug2052.sci55
-rw-r--r--tests/nonRegression/bug2067.sci22
-rw-r--r--tests/nonRegression/bug2092.sci21
-rw-r--r--tests/nonRegression/bug2093.sci23
-rw-r--r--tests/nonRegression/bug2098.sci34
-rw-r--r--tests/nonRegression/bug2149.sci58
-rw-r--r--tests/nonRegression/bug2162.sci28
-rw-r--r--tests/nonRegression/bug2181.sci36
-rw-r--r--tests/nonRegression/bug2263.sci52
-rw-r--r--tests/nonRegression/bug2264.sci22
-rw-r--r--tests/nonRegression/bug2268.sci20
-rw-r--r--tests/nonRegression/bug2270.sci25
-rw-r--r--tests/nonRegression/bug2277.sci27
33 files changed, 0 insertions, 1203 deletions
diff --git a/tests/nonRegression/bug1786.sci b/tests/nonRegression/bug1786.sci
deleted file mode 100644
index 6659773..0000000
--- a/tests/nonRegression/bug1786.sci
+++ /dev/null
@@ -1,40 +0,0 @@
1// <-- Non-regression test for bug 1786 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1786
5//
6// <-- Short Description -->
7// Scilab 4.0-RC1
8// Handle Label : rotation of the text
9//
10// Changing field Label.auto_rotation to off does not causes the rotation of the
11// text. To force the rotation, it is necessary to re-affect the value of
12// Label.font_angle.
13//
14// jacques-Deric
15
16// Copyright INRIA
17// Scilab Project - Pierre MARECHAL
18// Copyright INRIA 2005
19// Date : 6 fevrier 2005
20
21hf = scf (1);
22ha = gca ();
23hlt = ha.title;
24
25hlt.text = "Titre/Title";
26
27test1 = (hlt.auto_rotation == "on");
28test2 = (hlt.auto_position == "on");
29
30hlt.font_angle = 180;
31test3 = (hlt.auto_rotation == "off");
32
33hlt.position = [0.5,0.5];;
34test4 = (hlt.auto_position == "off");
35
36if( test1 & test2 & test3 & test4 ) then
37 affich_result(%T,1786);
38else
39 affich_result(%F,1786);
40end
diff --git a/tests/nonRegression/bug1787.sci b/tests/nonRegression/bug1787.sci
deleted file mode 100644
index 3c96f64..0000000
--- a/tests/nonRegression/bug1787.sci
+++ /dev/null
@@ -1,37 +0,0 @@
1// <-- Non-regression test for bug 1787 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1787
5//
6// <-- Short Description -->
7// Scilab 4.0 RC1
8// The calling of procedure xtitle bugs when the drawing of boxes is asked.
9//
10// Jacques-Deric
11
12// Copyright INRIA
13// Scilab Project - Jean-Baptiste Silvy
14// Copyright INRIA 2006
15// Date : 10/02/2006
16
17titleStr = "Scilab P0W3R" ;
18xLabelStr = "XXX" ;
19yLabelStr = "YYY" ;
20
21xtitle("Scilab P0W3R",'XXX','YYY',1) ;
22a = gca() ;
23title = a.title ;
24xLabel = a.x_label ;
25yLabel = a.y_label ;
26
27resT = ( title.text == titleStr ) & ( title.fill_mode == 'on' ) ;
28resX = ( xLabel.text == xLabelStr ) & ( xLabel.fill_mode == 'on' ) ;
29resY = ( yLabel.text == yLabelStr ) & ( yLabel.fill_mode == 'on' ) ;
30
31// check that a box is drawn around the labels
32// and that they have the rigth text
33if ( resT & resX & resY ) then
34 affich_result(%T,1787);
35else
36 affich_result(%F,1787);
37end
diff --git a/tests/nonRegression/bug1794.sci b/tests/nonRegression/bug1794.sci
deleted file mode 100644
index e01ac73..0000000
--- a/tests/nonRegression/bug1794.sci
+++ /dev/null
@@ -1,34 +0,0 @@
1// <-- Non-regression test for bug 1794 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1794
5//
6// <-- Short Description -->
7// Problem encountered when redefining builtin function
8
9// Copyright INRIA
10// Scilab Project - Serge Steer
11// Copyright INRIA 2005
12// Date : 30 janvier 2006
13
14beta=5;
15try
16 beta
17 ok1=%t;
18catch
19 ok1=%f;
20end
21
22function y=foo()
23 beta;
24 y=beta+1
25endfunction
26
27try
28 foo()
29 ok2=%t;
30catch
31 ok2=%f;
32end
33
34affich_result(ok1&ok2,1794);
diff --git a/tests/nonRegression/bug1802.sci b/tests/nonRegression/bug1802.sci
deleted file mode 100644
index bd7bde5..0000000
--- a/tests/nonRegression/bug1802.sci
+++ /dev/null
@@ -1,18 +0,0 @@
1// <-- Non-regression test for bug 1802 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1802
5//
6// <-- Short Description -->
7// The sci2exp function is very very slow for large matrices
8
9
10// Non-regression test file for bug 1802
11// Copyright INRIA
12// Scilab Project - Serge Steer
13// Copyright INRIA 2005
14// Date : 30 janvier 2006
15
16a=rand(100,500);
17timer();sci2exp(a);t=timer();
18affich_result(t<60,1802);
diff --git a/tests/nonRegression/bug1859.sci b/tests/nonRegression/bug1859.sci
deleted file mode 100644
index e36046d..0000000
--- a/tests/nonRegression/bug1859.sci
+++ /dev/null
@@ -1,45 +0,0 @@
1// <-- Non-regression test for bug 1859 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1859
5//
6// <-- Short Description -->
7// I sent the following commands
8//
9// Year = [2002, 2002];
10// Month = [2, 3];
11// Day = [28, 1];
12// datenum(Year, Month, Day)
13//
14// The SCILAB output is:
15//
16// 731275. 731278.
17//
18// But this seems me incorrect, as 2002-03-01 is just one day following 2002-02-28.
19//
20// Now, if you give the commands
21//
22// datenum(2002,2,28)
23// datenum(2002,3,1)
24//
25// you respectively obtain the two outputs
26//
27// ...
28
29// Copyright INRIA
30// Scilab Project - Pierre MARECHAL
31// Copyright INRIA 2006
32// Date : 27 fevrier 2006
33
34Year = [2002, 2002];
35Month = [ 2, 3];
36Day = [ 28, 1];
37
38test = datenum(Year, Month, Day);
39ref = [731275 ; 731276];
40
41if ~or(test <> ref) then
42 affich_result(%T,1859);
43else
44 affich_result(%F,1859);
45end
diff --git a/tests/nonRegression/bug1867.sci b/tests/nonRegression/bug1867.sci
deleted file mode 100644
index 89895d5..0000000
--- a/tests/nonRegression/bug1867.sci
+++ /dev/null
@@ -1,59 +0,0 @@
1// <-- Non-regression test for bug 1867 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1867
5//
6// <-- Short Description -->
7// msscanf fails to parse formats with a large number of entries (larger
8// than 30 it
9// seems).
10
11// A.C
12// Copyright INRIA 2006
13
14str1 = '1 2 3 4 5 6 7 8 9 10';
15L1 = msscanf(str1,"%d %d %d %d %d %d %d %d %d %d");
16Test1=and(L1==[1:10]);
17
18str2 = '..
191 2 3 4 5 6 7 8 9 10 ..
2011 12 13 14 15 16 17 18 19 20 ..
2121 22 23 24 25 26 27 28 29 30 ..
2231 32 33 34 35 36 37 38 39 40 ..
2341 42 43 44 45 46 47 48 49 50';
24
25L2 = msscanf(str2,"..
26%d %d %d %d %d %d %d %d %d %d ..
27%d %d %d %d %d %d %d %d %d %d ..
28%d %d %d %d %d %d %d %d %d %d ..
29%d %d %d %d %d %d %d %d %d %d ..
30%d %d %d %d %d %d %d %d %d %d");
31Test2=and(L2==[1:50]);
32
33str3 = '..
341 2 3 4 5 6 7 8 9 10 ..
3511 12 13 14 15 16 17 18 19 20 ..
3621 22 23 24 25 26 27 28 29 30 ..
3731 32 33 34 35 36 37 38 39 40 ..
3841 42 43 44 45 46 47 48 49 50 ..
3951 52 53 54 55 56 57 58 59 60..
40';
41
42StrExec="..
43L3 = msscanf(str3,""..
44%d %d %d %d %d %d %d %d %d %d ..
45%d %d %d %d %d %d %d %d %d %d ..
46%d %d %d %d %d %d %d %d %d %d ..
47%d %d %d %d %d %d %d %d %d %d ..
48%d %d %d %d %d %d %d %d %d %d ..
49%d %d %d %d %d %d %d %d %d %d..
50"");";
51errmsg=execstr(StrExec,'errcatch');
52
53Test3=(errmsg==0);
54
55if (Test1 & Test2 & Test3) then
56 affich_result(%T,1867);
57else
58 affich_result(%F,1867);
59end
diff --git a/tests/nonRegression/bug1902.sci b/tests/nonRegression/bug1902.sci
deleted file mode 100644
index 10e8c9a..0000000
--- a/tests/nonRegression/bug1902.sci
+++ /dev/null
@@ -1,71 +0,0 @@
1// <-- Non-regression test for bug 1902 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1902
5//
6// <-- Short Description -->
7// in drawlater mode the bounding box of strings may be wrong
8
9// Copyright INRIA
10// Scilab Project - Jean-Baptiste Silvy
11// Copyright INRIA 2006
12// Date : October 25 2006
13
14
15// draw later part
16drawlater() ;
17
18xstring(0,0,['toto','titi';"tatapjp","iiih"]) ;
19
20e = gce() ;
21
22box11 = stringbox(e)
23
24a = gca() ;
25a.data_bounds = [-2,-2;7,7] ;
26
27box21 = stringbox(e)
28
29a.view = '3d' ;
30
31box31 = stringbox(e)
32
33a.data_bounds = [0,-1,3;6,7,8] ;
34
35box41 = stringbox(e)
36
37drawnow() ;
38
39
40clf() ;
41
42
43// same as first part but wthout drawlater
44xstring(0,0,['toto','titi';"tatapjp","iiih"]) ;
45
46e = gce() ;
47
48box12 = stringbox(e)
49
50a = gca() ;
51a.data_bounds = [-2,-2;7,7] ;
52
53box22 = stringbox(e)
54
55a.view = '3d' ;
56
57box32 = stringbox(e)
58
59a.data_bounds = [0,-1,3;6,7,8] ;
60
61box42 = stringbox(e)
62
63// bounding box should be the same either we are in drawlater or not.
64if ( norm( box11 - box12 ) < 0.1 ..
65 & norm( box21 - box22 ) < 0.1 ..
66 & norm( box31 - box32 ) < 0.1 ..
67 & norm( box41 - box42 ) < 0.1 ) then
68 affich_result(%T,1902) ;
69else
70 affich_result(%F,1902) ;
71end
diff --git a/tests/nonRegression/bug1933.sci b/tests/nonRegression/bug1933.sci
deleted file mode 100644
index fd664a5..0000000
--- a/tests/nonRegression/bug1933.sci
+++ /dev/null
@@ -1,22 +0,0 @@
1// <-- Non-regression test for bug 1933 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1933
5//
6// <-- Short Description -->
7// log and log2 doesn't work on vectors with %nan under windows. They work
8// nicely
9// under linux.
10
11// A.C
12// Copyright INRIA 2006
13
14A = [0 0 2 2 0 0];
15A(find(A==0)) = %nan;
16B=log(A);
17
18if ( isnan(B(1)) & isnan(B(2)) & isnan(B(5)) & isnan(B(6)) ) then
19 affich_result(%T,1933);
20else
21 affich_result(%F,1933);
22end
diff --git a/tests/nonRegression/bug1955.sci b/tests/nonRegression/bug1955.sci
deleted file mode 100644
index 15acda2..0000000
--- a/tests/nonRegression/bug1955.sci
+++ /dev/null
@@ -1,21 +0,0 @@
1// <-- Non-regression test for bug 1955 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1955
5//
6// <-- Short Description -->
7// Reshaping global hypermatrices is problematic, as demonstrated by the
8// attached file 'bug.sci', which contains further comments.
9
10// Copyright INRIA
11// Scilab Project - Serge Steer
12// Copyright INRIA 2006
13// Date : 3 mai 2006
14
15global ghm
16
17ghm=matrix(1:8,2,4);
18ghm=matrix(ghm,2,2,2);
19
20r= and(ghm==matrix(1:8,2,2,2))
21affich_result(r,1955);
diff --git a/tests/nonRegression/bug1956.sci b/tests/nonRegression/bug1956.sci
deleted file mode 100644
index fd684aa..0000000
--- a/tests/nonRegression/bug1956.sci
+++ /dev/null
@@ -1,31 +0,0 @@
1// <-- Non-regression test for bug 1956 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1956
5//
6// <-- Short Description -->
7// this works for example:
8// a=10; // a constant
9// for i=1:2
10// d(i)=a;
11// end
12// but it doesn't work if 'a' is a structure.
13// I find a solution for a structure:
14// a.b=[1 2 3];
15// a.c=[4 5 6]
16// but it's not smart and clear code...
17
18// Copyright INRIA
19// Scilab Project - Serge Steer
20// Copyright INRIA 2006
21// Date : 4 mai 2006
22
23clear a d
24a.b=[1 2 3];
25d(1)=a
26r=and(d==a)
27d(2)=a;
28r=r&and(d(1)==a)
29r=r&and(d(2)==a)
30
31affich_result(r,1956);
diff --git a/tests/nonRegression/bug1957.sci b/tests/nonRegression/bug1957.sci
deleted file mode 100644
index f4d1719..0000000
--- a/tests/nonRegression/bug1957.sci
+++ /dev/null
@@ -1,64 +0,0 @@
1// <-- Non-regression test for bug 1957 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1957
5//
6// <-- Short Description -->
7// Non fonctionnement de intersci pour les variables optionnelles (au
8// moins scalaires)
9
10// Copyright INRIA
11// Scilab Project - Serge Steer
12// Copyright INRIA 2006
13// Date : 15 mai 2006
14
15tab=ascii(9);
16path=TMPDIR;
17
18desc=['foo'+tab+'x'+tab+'y'+tab+'[ITMAX 2000]'+tab+'[eps 0.001]'
19 'x'+tab+'scalar'
20 'y'+tab+'scalar'
21 'ITMAX'+tab+'scalar'
22 'eps '+tab+'scalar'
23 'r'+tab+'vector 4'
24 ''
25 'foo'+tab+'x'+tab+'y'+tab+' ITMAX'+tab+'eps'+tab+'r'
26 'x'+tab+'double'
27 'y'+tab+'double'
28 'ITMAX'+tab+'integer'
29 'eps'+tab+'double'
30 'r'+tab+'double'
31 ''
32 'out sequence'+tab+'r'
33 '*******************'];
34mputl(desc,path+'/intsfoo.desc')
35
36foo_code=['#include ""stack-c.h""'
37 'void C2F(foo)(double *x,double *y,int *ITMAX,double *eps,double *r)'
38 ' {'
39 ' r[0]=*x; r[1]=*y; r[2]=*ITMAX; r[3]=*eps;'
40 ' }'];
41mputl(foo_code,path+'/foo.c')
42
43intersci=getshortpathname(SCI+'/modules/intersci/bin/intersci-n')
44
45curpath=pwd()
46chdir(path)
47try
48 unix_s(intersci+' intsfoo')
49 ilib_build('testlib',['test','intsfoo'],['foo.o','intsfoo.o'],[])
50 exec loader.sce
51catch
52 affich_result(%f,1957);
53 return
54end
55chdir(curpath)
56res=test(1.2,-2.3);
57r=norm(res-[1.2,-2.3,2000,0.001])<1d-10;
58res=test(1.2,-2.3,ITMAX=33);
59r=r&norm(res-[1.2,-2.3,33,0.001])<1d-10;
60res=test(1.2,-2.3,eps=1d-7);
61r=r&norm(res-[1.2,-2.3,2000,1d-7])<1d-10;
62res=test(1.2,-2.3,eps=1d-7,ITMAX=33);
63r=r&norm(res-[1.2,-2.3,33,1d-7])<1d-10;
64 affich_result(r,1957);
diff --git a/tests/nonRegression/bug1977.sci b/tests/nonRegression/bug1977.sci
deleted file mode 100644
index 72d6c81..0000000
--- a/tests/nonRegression/bug1977.sci
+++ /dev/null
@@ -1,28 +0,0 @@
1// <-- Non-regression test for bug 1977 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1977
5//
6// <-- Short Description -->
7// inttype has stars in error message
8//
9//
10// -->inttype("hell")
11// !--error 44
12// ***th argument is incorrect
13//
14//
15// Francois
16
17// Copyright INRIA
18// Scilab Project - Pierre MARECHAL
19// Copyright INRIA 2006
20// Date : 23 mai 2006
21
22execstr('inttype(''hell'')','errcatch');
23
24if lasterror() == 'first argument is incorrect' then
25 affich_result(%T,1977);
26else
27 affich_result(%F,1977);
28end
diff --git a/tests/nonRegression/bug1979.sci b/tests/nonRegression/bug1979.sci
deleted file mode 100644
index 4638b9b..0000000
--- a/tests/nonRegression/bug1979.sci
+++ /dev/null
@@ -1,29 +0,0 @@
1// <-- Non-regression test for bug 1979 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1979
5//
6// <-- Short Description -->
7// I think that something is forgotten in the integer treatment in Scilab :
8//
9// -->a=int32(1);b=int32(6);
10// -->a:b
11// a:b
12// !--error 4
13// undefined variable : %i_b_i
14
15// Copyright INRIA
16// Scilab Project - Pierre MARECHAL
17// Copyright INRIA 2006
18// Date : 23 mai 2006
19
20a = int32(1);
21b = int32(6);
22c = a:b;
23d = int32([1 2 3 4 5 6]);
24
25if and( c == d ) then
26 affich_result(%T,1979);
27else
28 affich_result(%F,1979);
29end
diff --git a/tests/nonRegression/bug1991.sci b/tests/nonRegression/bug1991.sci
deleted file mode 100644
index 09b9280..0000000
--- a/tests/nonRegression/bug1991.sci
+++ /dev/null
@@ -1,24 +0,0 @@
1// <-- Non-regression test for bug 1991 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1991
5//
6// <-- Short Description -->
7// [a,b]=(3,int32(5))
8// !--error 78
9// convert: wrong number of lhs arguments
10
11// Copyright INRIA
12// Scilab Project - Serge Steer
13// Copyright INRIA 2006
14// Date : 15 mai 2006
15
16[a,b]=(3,int32(5));
17r=a==3&b==int32(5);
18a=(3 + int32(5));
19r=r&(a==int32(8));
20
21[a,b,c]=(3,(2),sin(5));
22r=r&a==3&b==2&c==sin(5);
23
24affich_result(r,1991);
diff --git a/tests/nonRegression/bug2014.sci b/tests/nonRegression/bug2014.sci
deleted file mode 100644
index 726d5f6..0000000
--- a/tests/nonRegression/bug2014.sci
+++ /dev/null
@@ -1,36 +0,0 @@
1// <-- Non-regression test for bug 2014 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2014
5//
6// <-- Short Description -->
7// The function isequal doesn't work properly with list.
8//
9// -->a=list("a");b=list("a","b");
10// -->isequal(a,b)
11// ans =
12//
13// T
14//
15// -->isequal(b,a)
16// !--error 21
17// invalid index
18// at line 10 of function %l_isequal called by :
19// isequal(b,a)
20//
21// I propose this modification of the macro %l_isequal in the file
22// SCI/macros/percent/%l_isequal.sci :
23//
24// 1 - function r=%l_isequal(x1,varargin)
25// 2 - narg=size(varargin)
26// 3 - if narg==0 then error('isequal requires at least two input arguments'),end
27// ...
28
29// Copyright INRIA
30// Scilab Project - Serge Steer
31// Copyright INRIA 2006
32// Date : june 2006
33
34l1=list(1,2,3);l2=list(1,2);l3=list();
35r=isequal(l1,l1)&isequal(l3,l3)&~isequal(l1,l2)&~isequal(l3,l1)
36affich_result(r,2014);
diff --git a/tests/nonRegression/bug2022.sci b/tests/nonRegression/bug2022.sci
deleted file mode 100644
index 9f693c0..0000000
--- a/tests/nonRegression/bug2022.sci
+++ /dev/null
@@ -1,31 +0,0 @@
1// <-- Non-regression test for bug 2022 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2022
5//
6// <-- Short Description -->
7// percentile function (perctl) doesn't always calculate percentile value, instead
8// choosing to error out:
9//
10// Example that causes error:
11//
12// perctl([23.4,364.34,1929.3,4234.3,293.3,928.3],[10])
13
14// Author : Scilab Project - Pierre MARECHAL
15// Copyright INRIA
16// Date : 12 june 2006
17
18test1 = ( perctl([500 480 460 453 452 452 451 450 450 431 421 420 420 417 416 414 410 410 405 397 380 360 332],90) == [472 3] );
19test2 = ( perctl([500 480 460 453 452 452 451 450 450 431 421 420 420 417 416 414 410 410 405 397 380 360 332],75) == [452 6] );
20test3 = ( perctl([500 480 460 453 452 452 451 450 450 431 421 420 420 417 416 414 410 410 405 397 380 360 332],10) == [368 22] );
21test4 = ( perctl([500 480 460 453 452 452 451 450 450 431 421 420 420 417 416 414 410 410 405 397 380 360 332],1) == [332 23] );
22test5 = ( perctl([500 480 460 453 452 452 451 450 450 431 421 420 420 417 416 414 410 410 405 397 380 360 332],2) == [332 23] );
23test6 = ( perctl([500 480 460 453 452 452 451 450 450 431 421 420 420 417 416 414 410 410 405 397 380 360 332],99) == [500 1] );
24
25test7 = ( perctl([23.4,364.34,1929.3,4234.3,293.3,928.3],[10]) == [23.4 1] );
26
27if and(test1) & and(test2) & and(test3) & and(test4) & and(test5) & and(test6) & and(test7) then
28 affich_result(%T,2022);
29else
30 affich_result(%F,2022);
31end
diff --git a/tests/nonRegression/bug2038.sci b/tests/nonRegression/bug2038.sci
deleted file mode 100644
index cd99aac..0000000
--- a/tests/nonRegression/bug2038.sci
+++ /dev/null
@@ -1,45 +0,0 @@
1// <-- Non-regression test for bug 2038 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2038
5//
6// <-- Short Description -->
7// The dir command does not read properly directories different from the
8// current
9// one. Give the command a=dir('SubDir') (assuming SubDir exists and is
10// non
11// empty). Then, each element of a.isdir is %f, each element of a.date and
12// a.bytes
13// is 0.
14//
15// See also
16// http://groups.google.it/group/comp.soft-
17// sys.math.scilab/browse_thread/thread/2f81e9afd1d7d6f1/e33536bff4dc1ecf#e
18// 33536bff4dc1ecf
19
20// Author : Scilab Project - Allan CORNET
21// Copyright INRIA
22// Date : 3 july 2006
23
24mkdir('bug2038_dir');
25cd('bug2038_dir');
26mkdir('bug2038_subdir');
27cd('..')
28
29a=dir('bug2038_dir');
30b=mtlb_dir('bug2038_dir');
31
32x=getdate(a.date);
33cx=x(1:4);
34
35y=getdate();
36cy=y(1:4);
37
38T1=(a.isdir & b.isdir);
39T2=(cx == cy);
40
41if (T1 & T2) then
42 affich_result(%T,2038);
43else
44 affich_result(%F,2038);
45end
diff --git a/tests/nonRegression/bug2039.sci b/tests/nonRegression/bug2039.sci
deleted file mode 100644
index 51127b3..0000000
--- a/tests/nonRegression/bug2039.sci
+++ /dev/null
@@ -1,37 +0,0 @@
1// <-- Non-regression test for bug 2039 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2039
5//
6// <-- Short Description -->
7// non empty lasterror on Scilab startup
8//
9//
10// Startup execution:
11// loading initial environment
12//
13// -->[str,n,line,func]=lasterror(%f)
14// func =
15//
16//
17// line =
18//
19// 0.
20// n =
21//
22// 999.
23// str =
24//
25// Cannot query value of this type.
26//
27// ...
28
29// Author : Scilab Project - Pierre MARECHAL
30// Copyright INRIA
31// Date : 28 june 2006
32
33if lasterror(%F) == [] then
34 affich_result(%T,2039);
35else
36 affich_result(%F,2039);
37end
diff --git a/tests/nonRegression/bug2045.sci b/tests/nonRegression/bug2045.sci
deleted file mode 100644
index 83fc930..0000000
--- a/tests/nonRegression/bug2045.sci
+++ /dev/null
@@ -1,70 +0,0 @@
1// <-- Non-regression test for bug 2045 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2045
5//
6// <-- Short Description -->
7// xpolys([],[],-1)
8// kills scilex
9
10// Copyright INRIA
11// Scilab Project - Jean-Baptiste Silvy
12// Copyright INRIA 2006
13// Date : October 27 2006
14
15// should not draw anything
16xpolys([],[],-1) ;
17
18e = gce() ;
19
20if ( e.type <> "Axes" ) then
21 affich_result(%F,2045) ;
22end
23
24
25xpoly([],[]) ;
26
27// should create an empty polyline
28e = gce() ;
29
30if ( e.type <> "Polyline" ) then
31 affich_result(%F,2045) ;
32end
33
34if ( size(e.data) <> [0,0] ) then
35 affich_result(%F,2045) ;
36end
37
38// check if scilab don't crash
39plot3d ;
40
41e.data = rand(100,2) ;
42
43e.data = [] ;
44
45xdel(winsid()) ;
46
47// check if nothing is broken
48xpolys(rand(12,12), rand(12,12) ) ;
49
50e = gce() ;
51
52if ( e.type <> "Compound" ) then
53 affich_result(%F,2045) ;
54end
55
56if ( size(e.children) <> 12 ) then
57 affich_result(%F,2045) ;
58end
59
60delete(gca()) ;
61
62xpoly( rand(1,12), rand(1,12) ) ;
63
64e = gce() ;
65
66if ( e.type <> "Polyline" ) then
67 affich_result(%F,2045) ;
68end
69
70affich_result(%T,2045) ;
diff --git a/tests/nonRegression/bug205.sci b/tests/nonRegression/bug205.sci
deleted file mode 100644
index 011a598..0000000
--- a/tests/nonRegression/bug205.sci
+++ /dev/null
@@ -1,38 +0,0 @@
1// <-- Non-regression test for bug 205 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=205
5//
6// <-- Short Description -->
7// Bug Report Id: 04062001110115540
8// determ oublie les termes de plus haut degre.
9//
10// On Scilab 2.5 with " determ " function
11// The Error Messages are:
12//
13// Commands: // scilab dit que le polynome caracteristique de
14// // cette matrice de dimension
15// // 30 est de degre 21
16// N=30
17// a=rand(N,N)
18// s=poly(0,'s')
19// p=determ(eye(N,N)*s-a)
20// degree(p)
21//
22// Gaubert on Linux PPC version 2.2.13 distribution with X/kde as window manager
23// France February 10, 2001 at 11:55:40
24
25// Author : Scilab Project - Pierre MARECHAL
26// Copyright INRIA
27// Date : 09 june 2006
28
29N=30;
30A=rand(N,N);
31s=poly(0,'s');
32P=determ( eye(N,N)*%s - A );
33
34if degree(P)==30 then
35 affich_result(%T,205);
36else
37 affich_result(%F,205);
38end
diff --git a/tests/nonRegression/bug2052.sci b/tests/nonRegression/bug2052.sci
deleted file mode 100644
index c102d5d..0000000
--- a/tests/nonRegression/bug2052.sci
+++ /dev/null
@@ -1,55 +0,0 @@
1// <-- Non-regression test for bug 2052 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2052
5//
6// <-- Short Description -->
7// Bug dans la primitive "isequal" (au moins) avec des type de données
8// utilisateur
9
10// Serge Steer - Scilab Project
11// Copyright INRIA
12// 19/02/2007
13
14cur=pwd();
15cd(TMPDIR);
16//first create a function changetype
17code=['#include ""stack-c.h""'
18'int intchangetype(fname)'
19' char *fname;'
20'{'
21' int m1,n1,l1;'
22' CheckRhs(2,2);'
23' CheckLhs(1,1);'
24' GetRhsVar(2,""i"",&m1,&n1,&l1)'
25' /* change the type */'
26' *istk(iadr(*Lstk(Top-1)))=*istk(l1);'
27' C2F(intersci).ntypes[0] = ''$'';'
28' LhsVar(1)=1;'
29' return 0;'
30'}'];
31mputl(code,'intchangetype.c');
32ilib_build('libtest',['changetype','intchangetype'],'intchangetype',[]);
33exec('loader.sce')
34cd(cur);
35
36
37//create variables of type 222
38A=rand(3,2);
39a=changetype(A,222);
40//associate a typename to 222
41typename("bug2052", 222)
42//define overloading function for isequal
43function r=%bug2052_isequal(x,y)
44 r=type(x)==222&type(y)==222
45 if r then
46 x=changetype(x,1)
47 y=changetype(y,1)
48 r=r&and(x==y)
49 end
50endfunction
51//Check if everything is ok
52l=list(1,2,3);
53r=isequal(a,a)&~isequal(a,A)&~isequal(A,a)&isequal(A,A)&isequal(l,l)&~isequal(l,A);
54
55affich_result(r,2052);
diff --git a/tests/nonRegression/bug2067.sci b/tests/nonRegression/bug2067.sci
deleted file mode 100644
index f00cfb4..0000000
--- a/tests/nonRegression/bug2067.sci
+++ /dev/null
@@ -1,22 +0,0 @@
1// <-- Non-regression test for bug 2067 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2067
5//
6// <-- Short Description -->
7// Scilab dies when the Plot command is given a large numerical value.
8//
9// Tried it with Scilab Nightly Build 20060710.
10//
11// Greetings from Poland,
12// Lukasz Hladowski.
13
14// Copyright INRIA
15// Scilab Project - Jean-Baptiste Silvy
16// Copyright INRIA 2006
17// Date : July 11 2006
18
19// the bug was hanging the computer
20plot( 10^16, 5) ;
21
22affich_result(%T,2067) ;
diff --git a/tests/nonRegression/bug2092.sci b/tests/nonRegression/bug2092.sci
deleted file mode 100644
index 6244a02..0000000
--- a/tests/nonRegression/bug2092.sci
+++ /dev/null
@@ -1,21 +0,0 @@
1// <-- Non-regression test for bug 2092 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2092
5//
6// <-- Short Description -->
7// Incorrect handling of second input argument to function mad()
8
9// Copyright INRIA
10// Scilab Project - Pierre MARECHAL
11// Copyright INRIA 2006
12// Date : 17 aout 2006
13
14A = mad([1:10;2:11],2);
15B = mad([1:10;2:11],'c');
16
17if and(A == B) then
18 affich_result(%T,2092);
19else
20 affich_result(%F,2092);
21end
diff --git a/tests/nonRegression/bug2093.sci b/tests/nonRegression/bug2093.sci
deleted file mode 100644
index 5bcdd83..0000000
--- a/tests/nonRegression/bug2093.sci
+++ /dev/null
@@ -1,23 +0,0 @@
1// <-- Non-regression test for bug 2093 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2093
5//
6// <-- Short Description -->
7// matrix(A,q) doesn't return a q*1 matrix when A is a 1*1*q matrix and q a scalar.
8// Instead, it returns a mlist.
9
10// Copyright INRIA
11// Scilab Project - Pierre MARECHAL
12// Copyright INRIA 2006
13// Date : 28 août 2006
14
15A = rand(1,1,6);
16B = matrix(A,6);
17C = matrix(A,[6,1]);
18
19if (type(B) == 1) & (type(C) == 1) then
20 affich_result(%T,2093);
21else
22 affich_result(%F,2093);
23end
diff --git a/tests/nonRegression/bug2098.sci b/tests/nonRegression/bug2098.sci
deleted file mode 100644
index 5663c6e..0000000
--- a/tests/nonRegression/bug2098.sci
+++ /dev/null
@@ -1,34 +0,0 @@
1// <-- Non-regression test for bug 2098 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2098
5//
6// <-- Short Description -->
7// showprofile(test) makes Scilab crash if the function 'test' has not
8// been prepared for profiling, as demonstrated by the following example:
9//
10// -->function test
11// -->disp('test')
12// -->endfunction
13//
14// -->test
15//
16// test
17//
18// -->showprofile(test) // this line makes Scilab exit silently
19
20// Author : Scilab Project - Pierre MARECHAL
21// Copyright INRIA
22// Date : 05 mai 2007
23
24function test
25 disp('test');
26endfunction
27
28ierr = execstr('showprofile(test)','errcatch');
29
30if( ierr == 1000 ) then
31 affich_result(%T,2098);
32else
33 affich_result(%F,2098);
34end
diff --git a/tests/nonRegression/bug2149.sci b/tests/nonRegression/bug2149.sci
deleted file mode 100644
index c96487d..0000000
--- a/tests/nonRegression/bug2149.sci
+++ /dev/null
@@ -1,58 +0,0 @@
1// <-- Non-regression test for bug 2149 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2149
5//
6// <-- Short Description -->
7// Missing error message in fprintfMat
8//
9//
10// help fprintfMat states that the matrix to save must be a matrix of real
11// numbers. Therefore:
12//
13// -->M=[1+%i;1-%i];
14//
15// -->fprintfMat("mymatrix.txt",M,"%f")
16//
17// -->
18// should spit an error. It does not but it silently saves the real part
19// of M instead.
20//
21// Another (better) option: extend fprintfMat/scanfMat so that they work
22// with complex matrices (or matrices of integers, booleans, etc).
23//
24// Francois
25
26// Copyright INRIA
27// Scilab Project - Allan CORNET
28// Copyright INRIA 2006
29
30correctItem=0;
31
32M=[1+%i;2+3*%i] ;
33try
34 fprintfMat(TMPDIR+'/pipo.txt',M,'%f',['comment un';'comment 2'])
35 correct=%T;
36catch
37 correctItem=correctItem+1;
38end
39
40M=[1.2,2.3];
41try
42 fprintfMat(TMPDIR+'/pipo.txt',M,'%f',['comment un';'comment 2'])
43catch
44 correctItem=correctItem+1;
45end
46
47try
48 fprintfMat(TMPDIR+'/pipo.txt','M','%f',['comment un';'comment 2'])
49 correct=%T;
50catch
51 correctItem=correctItem+1;
52end
53
54if (correctItem == 2) then
55 affich_result(%T,2149);
56else
57 affich_result(%F,2149);
58end
diff --git a/tests/nonRegression/bug2162.sci b/tests/nonRegression/bug2162.sci
deleted file mode 100644
index fa757dc..0000000
--- a/tests/nonRegression/bug2162.sci
+++ /dev/null
@@ -1,28 +0,0 @@
1// <-- Non-regression test for bug 2162 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2162
5//
6// <-- Short Description -->
7// When using plot3d with facets coordinates, it is impossible to draw a single facet.
8
9// Copyright INRIA
10// Scilab Project - Jean-Baptiste Silvy
11// Copyright INRIA 2006
12// Date : October 19 2006
13
14xf = [0;0;0;0] ;
15yf = [0;1;1;0] ;
16zf = [0;0;1;1] ; // coordinates of a square
17
18// plot3d routine should be able to draw a single square
19plot3d( xf, yf, zf ) ;
20
21e = gce() ;
22
23if ( e.type == "Fac3d" ) then
24 affich_result(%T,2162);
25else
26 affich_result(%F,2162);
27end
28
diff --git a/tests/nonRegression/bug2181.sci b/tests/nonRegression/bug2181.sci
deleted file mode 100644
index aedacc7..0000000
--- a/tests/nonRegression/bug2181.sci
+++ /dev/null
@@ -1,36 +0,0 @@
1// <-- Non-regression test for bug 2181 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2181
5//
6// <-- Short Description -->
7// getrelativefilename crashes when the two arguments it receives refer to
8// different drives.
9//
10// Francois
11
12// Pierre MARECHAL - Scilab Project
13// Copyright INRIA
14// 30 octobre 2006
15
16if MSDOS then
17
18 test1 = getrelativefilename("D:\","C:\Program Files\scilab\readme.txt");
19 test2 = getrelativefilename("C:\","C:\Program Files\scilab\readme.txt");
20 test3 = getrelativefilename("C:\Documents and Settings","C:\Program Files\scilab\readme.txt");
21 test4 = getrelativefilename("C:\PROGRAM FILES\toto","c:\program files\scilab\readme.txt");
22
23 res1 = ( test1 == "C:\Program Files\scilab\readme.txt" );
24 res2 = ( test2 == "C:\Program Files\scilab\readme.txt" );
25 res3 = ( test3 == "..\Program Files\scilab\readme.txt" );
26 res4 = ( test4 == "..\scilab\readme.txt" );
27
28 if (res1 & res2 & res3) then
29 affich_result(%T,2181);
30 else
31 affich_result(%F,2181);
32 end
33
34else
35 affich_result(%T,2181);
36end
diff --git a/tests/nonRegression/bug2263.sci b/tests/nonRegression/bug2263.sci
deleted file mode 100644
index 0b49e46..0000000
--- a/tests/nonRegression/bug2263.sci
+++ /dev/null
@@ -1,52 +0,0 @@
1// <-- Non-regression test for bug 2263 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2263
5//
6// <-- Short Description -->
7// Suppose you want to call a arbitrary scilab function "test". But you want the
8// outputs from this function be stored in a matlab-like struct, for example,
9// [out.t1,out.t2,out.t3,out.t4]=test(1)
10// This works fine, but if you have a nested structure (out.a.XXX) than scilab is
11// not able to provide the outputs at the correct places, for example
12// [out.a.t1,out.a.t2,out.a.t3,out.a.t4]=test(1).
13//
14//
15// The function "test" could be:
16// function [a,b,c,d,e]=teste(in)
17// a=in;
18// b=in+1;
19// c=in+2;
20// d=in+3;
21// e=in+4;
22// endfunction
23
24// Serge Steer - Scilab Project
25// Copyright INRIA
26// 2 janv 2007
27
28function [a,b,c,d,e]=test()
29 a=1;b=2;c=3;d=4;e=5;
30endfunction
31[out.a.t1,out.a.t2,out.a.t3,out.a.t4]=test();
32T=%t;
33T=T&and(out==mlist(["st","dims","a"],int32([1,1]),..
34 mlist(["st","dims","t4","t3","t2","t1"],int32([1,1]),4,3,2,1))) ;
35
36clear out
37[out.a.t1,t2,out.a.t3,t4]=test();
38T=T&and(out==mlist(["st","dims","a"],int32([1,1]),..
39 mlist(["st","dims","t3","t1"],int32([1,1]),3,1)))&t2==2&t4==4;
40
41clear a
42[a.t1,a.t2,a.t3,a.t4]=test();
43T=T& and(a==mlist(["st","dims","t4","t3","t2","t1"],int32([1,1]),4,3,2,1));
44
45clear a
46[t1,a.t2,t3,a.t4]=test();
47T=T& and(a==mlist(["st","dims","t4","t2"],int32([1,1]),4,2))&t1==1&t3==3;
48
49[t1,t2,t3,t4]=test();
50T=T&and([t1 t2 t3 t4]==[1 2 3 4]);
51
52affich_result(T,2263);
diff --git a/tests/nonRegression/bug2264.sci b/tests/nonRegression/bug2264.sci
deleted file mode 100644
index 890f6c8..0000000
--- a/tests/nonRegression/bug2264.sci
+++ /dev/null
@@ -1,22 +0,0 @@
1// <-- Non-regression test for bug 2264 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2264
5//
6// <-- Short Description -->
7// lcm gives wrong value for 3-element vectors(cf bug 666)
8
9// Serge Steer - Scilab Project
10// Copyright INRIA
11// 2 janv 2007
12
13[q,fact]=lcm(int32([-6 5 7 12 4]));
14T=q==int32(420);
15[q,fact]=lcm(int32([6 5 7 3 4])) ;
16T=T&(q==int32(420));
17[q,fact]=lcm(int32([-6 5 1 3 4]));
18T=T&(q==int32(60));
19[q,fact]=lcm(int32([-6 5 0 3 4]));
20T=T&(q==int32(0));
21
22affich_result(T,2264);
diff --git a/tests/nonRegression/bug2268.sci b/tests/nonRegression/bug2268.sci
deleted file mode 100644
index 2b0ca74..0000000
--- a/tests/nonRegression/bug2268.sci
+++ /dev/null
@@ -1,20 +0,0 @@
1// <-- Non-regression test for bug 2268 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2268
5//
6// <-- Short Description -->
7// Memory leak in msscanf(). When calling msscanf() many times, as in reading in
8// large CSV files, process size grows beyond memory capacity.
9
10// Serge Steer - Scilab Project
11// Copyright INRIA
12// 2 janv 2007
13
14free=getmemory() ;
15for k=1:10000
16 foo=msscanf('1.234 44 55 66 77 88 88 ', '%f %f %f %f %f %f %f ');
17end
18leak=free-getmemory()
19T=leak<=4;
20affich_result(T,2266);
diff --git a/tests/nonRegression/bug2270.sci b/tests/nonRegression/bug2270.sci
deleted file mode 100644
index a3d0d1d..0000000
--- a/tests/nonRegression/bug2270.sci
+++ /dev/null
@@ -1,25 +0,0 @@
1// <-- Non-regression test for bug 2270 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2270
5//
6// <-- Short Description -->
7// datenum(Y,M,D) issues an incorrect error message when the third
8// parameter is invalid. The error should say 'The third argument must be
9// between 1 and 31', depending on the actual number of days in that
10// specific month.
11
12
13// Copyright INRIA
14// Scilab Project - Pierre MARECHAL
15// Copyright INRIA 2007
16// Date : 3 janvier 2007
17
18execstr('datenum(2006,12,32)','errcatch');
19error_str = lasterror();
20
21if stripblanks(error_str) <> "The third argument must be between 1 and 31" then
22 affich_result(%F,2270);
23else
24 affich_result(%T,2270);
25end
diff --git a/tests/nonRegression/bug2277.sci b/tests/nonRegression/bug2277.sci
deleted file mode 100644
index e3bc4dd..0000000
--- a/tests/nonRegression/bug2277.sci
+++ /dev/null
@@ -1,27 +0,0 @@
1// <-- Non-regression test for bug 2277 -->
2//
3// <-- Bugzilla URL -->
4// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2277
5//
6// <-- Short Description -->
7// Scilab has a bug with the SPARSE command. When the "values vector" in the
8// row/column representation is COMPLEX the routine fails to build the sparse
9// matrix correctly. This seems to occur always when the first AND third entry of
10// this vector are zero.
11// The other bug is that when other elements are zero (not the third, the fifth for
12// example) they are still stored in the sparse representation.
13// This is very problematic for people doing finite element calculations with scilab!
14
15// Copyright INRIA
16// Scilab Project - S. Steer
17// Copyright INRIA
18// Date : 17 Janv 2007
19
20ij = [1,3;1,7;3,3;4,4;5,3;6,10;7,1;7,9;8,10;9,6;9,7;9,9;10,10] ;
21v=[1 0 0 4:13]'*%i;
22A=sparse(ij,v,[10 10]);
23[ij2,v2,mn]=spget(A);
24r= and(v2==[1 4:13]'*%i) ;
25ij(2:3,:)=[];
26r=r&and(ij==ij2);
27affich_result(r,2277);