summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug564.sci
blob: d00d95cd52269b046e0f1642d3b2249780783618 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// <-- Non-regression test for bug 564 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=564
//
// <-- Short Description -->
//    CVS version of Scilab:
//    using break when it is not called for creates confusing
//    error messages. 
//    In the following code the breaks are useless, they should do
//    nothing
//    but they create uncomprehensible error messages (this code
//    is included
//    in a macro which is execed)
//      if ok then 
//          scs_m.objs(k)=XX
//          disp(1)
//          edited=%t;
//          disp(2)
//          needcompile=4
//          disp(3)
//          Cmenu='Replot';
//          disp(4),disp(Cmenu)
//          break
//        else
//          Cmenu='Open/Set' 
// ...

// Non-regression test file for bug 564
// Copyright INRIA

 // Modified by Pierre MARECHAL
// Copyright INRIA
// Date : 23 Mar 2005

function foo()
	if ok then
 
		disp(1);
		edited=%t;
		disp(2);
		needcompile=4
		disp(3);
		Cmenu='Replot';
		disp(4);,disp(Cmenu);
		break
	else
		Cmenu='Open/Set'
		break
	end
endfunction

ok=%t;
diary('bug564.txt");
foo();
exec(foo);
diary(0);

BUG564TXT = mgetl('bug564.txt');
BUG564REF = mgetl('bug564.ref');

if or(BUG564TXT<>BUG564REF) then
	affich_result(%F,564);
else
	affich_result(%T,564);
end

mdelete("bug564.txt");