* LCL: fixed ExtractFileNameWithoutExt and test (issue #14470)

git-svn-id: trunk@21564 -
This commit is contained in:
vincents 2009-09-04 11:05:31 +00:00
parent c01962c0c6
commit 27c55c7a84
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;