mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 02:59:19 +02:00
tests: replaced DoDirSeparators with DoPathDelims
git-svn-id: trunk@42684 -
This commit is contained in:
parent
da7315aa27
commit
1fdae44bb9
@ -14,8 +14,7 @@ unit TestFileProc;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fpcunit, testglobals,
|
Classes, SysUtils, fpcunit, testglobals, LazFileUtils, FileProcs;
|
||||||
FileProcs;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -46,8 +45,8 @@ end;
|
|||||||
procedure TTestFileProc.TestTrimFileName;
|
procedure TTestFileProc.TestTrimFileName;
|
||||||
procedure DoTest(AFileName, Expected: string);
|
procedure DoTest(AFileName, Expected: string);
|
||||||
begin
|
begin
|
||||||
DoDirSeparators(AFileName);
|
DoPathDelims(AFileName);
|
||||||
DoDirSeparators(Expected);
|
DoPathDelims(Expected);
|
||||||
AssertEquals(AFileName, Expected, TrimFilename(AFileName));
|
AssertEquals(AFileName, Expected, TrimFilename(AFileName));
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
@ -63,9 +62,9 @@ procedure TTestFileProc.TestCreateRelativePath;
|
|||||||
procedure DoTest(Filename, BaseDirectory, Expected: string;
|
procedure DoTest(Filename, BaseDirectory, Expected: string;
|
||||||
UsePointDirectory: boolean = false);
|
UsePointDirectory: boolean = false);
|
||||||
begin
|
begin
|
||||||
DoDirSeparators(Filename);
|
DoPathDelims(Filename);
|
||||||
DoDirSeparators(BaseDirectory);
|
DoPathDelims(BaseDirectory);
|
||||||
DoDirSeparators(Expected);
|
DoPathDelims(Expected);
|
||||||
AssertEquals('CreateRelativePath(File='+Filename+',Base='+BaseDirectory+')',
|
AssertEquals('CreateRelativePath(File='+Filename+',Base='+BaseDirectory+')',
|
||||||
Expected,
|
Expected,
|
||||||
CreateRelativePath(Filename,BaseDirectory,UsePointDirectory));
|
CreateRelativePath(Filename,BaseDirectory,UsePointDirectory));
|
||||||
|
@ -5,8 +5,7 @@ unit testfileutil;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fpcunit, testglobals,
|
Classes, SysUtils, fpcunit, testglobals, LazFileUtils, FileUtil;
|
||||||
FileUtil;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -53,8 +52,8 @@ end;
|
|||||||
procedure TTestFileUtil.TestTrimFileName;
|
procedure TTestFileUtil.TestTrimFileName;
|
||||||
procedure DoTest(AFileName, Expected: string);
|
procedure DoTest(AFileName, Expected: string);
|
||||||
begin
|
begin
|
||||||
DoDirSeparators(AFileName);
|
DoPathDelims(AFileName);
|
||||||
DoDirSeparators(Expected);
|
DoPathDelims(Expected);
|
||||||
AssertEquals(AFileName, Expected, TrimFilename(AFileName));
|
AssertEquals(AFileName, Expected, TrimFilename(AFileName));
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user