+ added test based on bug #24504

git-svn-id: trunk@34850 -
This commit is contained in:
Tomas Hajny 2016-11-08 22:24:22 +00:00
parent b7de70422f
commit ff02b2dfb5
2 changed files with 31 additions and 0 deletions

1
.gitattributes vendored
View File

@ -13224,6 +13224,7 @@ tests/test/units/dos/tenv.pp svneol=native#text/plain
tests/test/units/dos/tfattr.pp svneol=native#text/plain
tests/test/units/dos/tfexpand.pp svneol=native#text/plain
tests/test/units/dos/tfsearch.pp svneol=native#text/plain
tests/test/units/dos/tfsrch2.pp svneol=native#text/plain
tests/test/units/dos/tidos.pp svneol=native#text/plain
tests/test/units/dos/tidos2.pp svneol=native#text/plain
tests/test/units/dos/tverify.pp svneol=native#text/plain

View File

@ -0,0 +1,30 @@
program TFSrch2;
uses
Dos;
procedure TestWildCard(ADirList: String); //Issue #0024504
var
FRes: PathStr;
const
Expected = '';
begin
{$IFDEF DEBUG}
write('Testing FSearch(''',ADirList, ''', ''', DirectorySeparator, '''): ');
{$ENDIF DEBUG}
FRes := FSearch(ADirList, DirectorySeparator);
if (FRes <> Expected) then
begin
writeln('Fail: expected ''',Expected,''', but got ''',FRes,'''.');
Halt(1);
end
{$IFDEF DEBUG}
else
writeln('OK.');
{$ENDIF DEBUG}
end;
begin
TestWildCard(AllFilesMask);
TestWildCard('?');
end.