summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug2098.sci
blob: 5663c6e6731f5297546a9afad0de2ea6b88c6c5a (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
// <-- Non-regression test for bug 2098 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2098
//
// <-- Short Description -->
//    showprofile(test) makes Scilab crash if the function 'test' has not 
//    been prepared for profiling, as demonstrated by the following example:
//
//    -->function test
//    -->disp('test')
//    -->endfunction
//
//    -->test
//
//     test
//
//    -->showprofile(test)  // this line makes Scilab exit silently

// Author : Scilab Project - Pierre MARECHAL
// Copyright INRIA
// Date : 05 mai 2007

function test
	disp('test');
endfunction

ierr = execstr('showprofile(test)','errcatch');

if( ierr == 1000 ) then
	affich_result(%T,2098);
else
	affich_result(%F,2098);
end