summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug871.sci
blob: 3f1a0036e2e11742f29e4500dcacdf836f14608d (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// <-- Non-regression test for bug 871 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=871
//
// <-- Short Description -->
//    The Semicolon operator does not work on functions called
//    without parenthesis on args '()'. For instance:
//
//    --> rand()         // OK
//    ans  =
//
//        0.2113249  
//
//    --> rand();         // OK
//    [NO OUTPUT]
//
//    --> rand            // OK
//     ans  =
//
//        0.7560439 
//
//    --> rand;          // BUG: the semicolon doesn't work!!!!
//     ans  =
//
//        0.7560439

// Copyright INRIA
// Scilab Project - Pierre MARECHAL
// Date : 3 mai 2005

SCIFILE=TMPDIR+"/bug871.dia";

diary(SCIFILE);
rand;
diary(0);

SCIFILECONTENTS=mgetl(SCIFILE);

REFCONTENTS=[" ";
			"-->rand;";
			" ";
			"-->diary(0);"]

correct=%T

if or(REFCONTENTS<>SCIFILECONTENTS) then
  correct=%F
end

affich_result(correct,871);