summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug1586.sci
blob: 7cec6c198b93cc721dbac203d55a2653875e84ce (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
// <-- Non-regression test for bug 1586 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1586
//
// <-- Short Description -->
//    I have found a possible error in Scilab:
//    when I use the function 'mkdir'.
//    For example:
//
//    [status,msg]=mkdir('new_1')
//    msg  =
//
//    status  =
//        1.
//
//    (the result is OK.), but when I use it again (note that the
//    directory "new_1" already exists), then I obtain:
//
//    [status,msg]=mkdir('new_1')
//
//    msg=
//    Error : Directory or file D:\progs\scilab-3.1.1\contrib\lrp\example\
//          new_1 already exists.
//    status  =
//        0.
// ...

// Copyright INRIA
// Scilab Project - Pierre MARECHAL
// Copyright INRIA 2005
// Date : 28 octobre 2005

dirToSave = pwd();

cd(TMPDIR);
[status,msg]=mkdir('bug1586');
[status,msg]=mkdir('bug1586');

if( status == 2 )
	affich_result(%T,1586);
else
	affich_result(%F,1586);
end

rmdir('bug1586');
cd(dirToSave);