summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug2270.sci
blob: a3d0d1d1e64a88e1ac1c629297dc051996d0327b (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
// <-- Non-regression test for bug 2270 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2270
//
// <-- Short Description -->
//    datenum(Y,M,D) issues an incorrect error message when the third 
//    parameter is invalid. The error should say 'The third argument must be 
//    between 1 and 31', depending on the actual number of days in that 
//    specific month.


// Copyright INRIA
// Scilab Project - Pierre MARECHAL
// Copyright INRIA 2007
// Date : 3 janvier 2007

execstr('datenum(2006,12,32)','errcatch');
error_str = lasterror();

if stripblanks(error_str) <> "The third argument must be between 1 and 31" then
	affich_result(%F,2270);
else
	affich_result(%T,2270);
end