mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-05 07:00:27 +01:00
* LCL: fixed ExtractFileNameWithoutExt and test (issue #14470)
git-svn-id: trunk@21564 -
This commit is contained in:
parent
c01962c0c6
commit
27c55c7a84
@ -621,7 +621,7 @@ begin
|
|||||||
while (p>0) do begin
|
while (p>0) do begin
|
||||||
case Result[p] of
|
case Result[p] of
|
||||||
PathDelim: exit;
|
PathDelim: exit;
|
||||||
'.': Result:=copy(Result,1, p-1);
|
'.': exit(copy(Result,1, p-1));
|
||||||
end;
|
end;
|
||||||
dec(p);
|
dec(p);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -44,10 +44,10 @@ var
|
|||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
DoTest('test.pas', 'test');
|
DoTest('test.pas', 'test');
|
||||||
DoTest('test.pas.bak', 'test');
|
DoTest('test.pas.bak', 'test.pas');
|
||||||
DirName := AppendPathDelim('testdir');
|
DirName := AppendPathDelim('testdir');
|
||||||
DoTest(DirName + 'test.pas', DirName + 'test');
|
DoTest(DirName + 'test.pas', DirName + 'test');
|
||||||
DoTest(DirName + 'test.pas.bak', DirName + 'test');
|
DoTest(DirName + 'test.pas.bak', DirName + 'test.pas');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTestFileUtil.TestTrimFileName;
|
procedure TTestFileUtil.TestTrimFileName;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user