Add check for bug fix in bug report 38339

git-svn-id: trunk@48129 -
This commit is contained in:
pierre 2021-01-10 14:43:22 +00:00
parent b1a1e6c510
commit b7c519de81
2 changed files with 24 additions and 0 deletions

1
.gitattributes vendored
View File

@ -18639,6 +18639,7 @@ tests/webtbs/tw38310b.pp svneol=native#text/pascal
tests/webtbs/tw38310c.pp svneol=native#text/pascal
tests/webtbs/tw3833.pp svneol=native#text/plain
tests/webtbs/tw38337.pp svneol=native#text/plain
tests/webtbs/tw38339.pp svneol=native#text/plain
tests/webtbs/tw3840.pp svneol=native#text/plain
tests/webtbs/tw3841.pp svneol=native#text/plain
tests/webtbs/tw3863.pp svneol=native#text/plain

23
tests/webtbs/tw38339.pp Normal file
View File

@ -0,0 +1,23 @@
{%OPT=-O3 }
program test48086;
{$mode objfpc}{$H+}
function IsFontNameXLogicalFontDesc(const LongFontName: string): boolean;
var MinusCnt, p: integer;
begin
MinusCnt:=0;
for p:=1 to length(LongFontName) do
if LongFontName[p]='-' then inc(MinusCnt);
Result:=(MinusCnt=14);
end;
var
myfont:string;
begin
myfont:='Myfont--------------';
if IsFontNameXLogicalFontDesc(myfont) then
writeln('NO ERROR')
else
begin
writeln('Error in count');
halt(1);
end;
end.