diff --git a/.gitattributes b/.gitattributes index 6e53da4fc6..92806b8254 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/tests/test/units/dos/tfsrch2.pp b/tests/test/units/dos/tfsrch2.pp new file mode 100644 index 0000000000..b85fb7653d --- /dev/null +++ b/tests/test/units/dos/tfsrch2.pp @@ -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.