mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
* Adapted for MacOS
This commit is contained in:
parent
076364ca7f
commit
d5e09d73f9
@ -28,6 +28,12 @@ const
|
|||||||
TestDir: string = 'TESTDIR';
|
TestDir: string = 'TESTDIR';
|
||||||
TestFile: string = 'testfile';
|
TestFile: string = 'testfile';
|
||||||
|
|
||||||
|
{$IFDEF MACOS}
|
||||||
|
RelPathPrefix = ':';
|
||||||
|
{$ELSE}
|
||||||
|
RelPathPrefix = '';
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Err := false;
|
Err := false;
|
||||||
MkDir (TestDir);
|
MkDir (TestDir);
|
||||||
@ -38,11 +44,11 @@ begin
|
|||||||
WriteLn ('Returned value = ', S);
|
WriteLn ('Returned value = ', S);
|
||||||
Err := true;
|
Err := true;
|
||||||
end;
|
end;
|
||||||
Assign (F, TestDir + DirectorySeparator + TestFile);
|
Assign (F, RelPathPrefix + TestDir + DirectorySeparator + TestFile);
|
||||||
Rewrite (F);
|
Rewrite (F);
|
||||||
Close (F);
|
Close (F);
|
||||||
S := FSearch (TestFile, TestDir);
|
S := FSearch (TestFile, TestDir);
|
||||||
if S <> TestDir + DirectorySeparator + TestFile then
|
if S <> RelPathPrefix + TestDir + DirectorySeparator + TestFile then
|
||||||
begin
|
begin
|
||||||
WriteLn ('FSearch didn''t find the test file!!');
|
WriteLn ('FSearch didn''t find the test file!!');
|
||||||
WriteLn ('Returned value = ', S);
|
WriteLn ('Returned value = ', S);
|
||||||
@ -55,7 +61,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2005-02-14 17:13:37 peter
|
Revision 1.3 2005-04-21 20:37:43 olle
|
||||||
|
* Adapted for MacOS
|
||||||
|
|
||||||
|
Revision 1.2 2005/02/14 17:13:37 peter
|
||||||
* truncate log
|
* truncate log
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user