mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 13:29:26 +01:00
system unit testing : basic directory services
This commit is contained in:
parent
622607ea6c
commit
e23694b03e
38
tests/test/units/system/tdir.pp
Normal file
38
tests/test/units/system/tdir.pp
Normal file
@ -0,0 +1,38 @@
|
||||
{ Program to test OS-specific features of the system unit }
|
||||
{ routines to test: }
|
||||
{ mkdir() }
|
||||
{ chdir() }
|
||||
{ This program shoulf not be executed in a roto directory }
|
||||
{ Creates the following directory, and sets it as the }
|
||||
{ current directory. }
|
||||
{ ../testdir }
|
||||
|
||||
|
||||
Program tdir;
|
||||
{$I+}
|
||||
|
||||
var
|
||||
s: string;
|
||||
Begin
|
||||
Writeln('changing to parent directory...');
|
||||
chdir('..');
|
||||
Writeln('making directory...');
|
||||
mkdir('testdir');
|
||||
Writeln('going into the newly created directory...');
|
||||
chdir('testdir');
|
||||
Writeln('making directory...');
|
||||
mkdir('testdir2');
|
||||
WriteLn('removing directory ...');
|
||||
rmdir('testdir2');
|
||||
WriteLn('getting current directory...');
|
||||
getdir(0,s);
|
||||
WriteLn(s);
|
||||
end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 2001-07-14 04:25:17 carl
|
||||
system unit testing : basic directory services
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user