1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2007-2008 - INRIA - Bruno JOFRET <bruno.jofret@inria.fr>
4//
5//  This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- CLI SHELL MODE -->
8// =============================================================================
9// Unitary tests for mdelete function
10// =============================================================================
11// TEST 1 : dummy file
12cd TMPDIR;
13r = mputl('I am a dummy String', 'dummyFile.dummy');
14if r <> %T then bugmes();quit;end
15lsResult = ls("dummyFile.dummy");
16// Testing if the file created exists
17if lsResult == []      then bugmes();quit;end
18// Now trying to delete it
19mdelete dummyFile.dummy
20// Test if the file has been deleted or not
21lsResult = ls("dummyFile.dummy")
22 lsResult  =
23    []
24// Testing if the file is effectively dead
25if lsResult <> []      then bugmes();quit;end
26