Просмотр исходного кода

Add check for bug fix in bug report 38339

git-svn-id: trunk@48129 -
pierre 4 лет назад
Родитель
Сommit
b7c519de81
2 измененных файлов с 24 добавлено и 0 удалено
  1. 1 0
      .gitattributes
  2. 23 0
      tests/webtbs/tw38339.pp

+ 1 - 0
.gitattributes

@@ -18639,6 +18639,7 @@ tests/webtbs/tw38310b.pp svneol=native#text/pascal
 tests/webtbs/tw38310c.pp svneol=native#text/pascal
 tests/webtbs/tw38310c.pp svneol=native#text/pascal
 tests/webtbs/tw3833.pp svneol=native#text/plain
 tests/webtbs/tw3833.pp svneol=native#text/plain
 tests/webtbs/tw38337.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/tw3840.pp svneol=native#text/plain
 tests/webtbs/tw3841.pp svneol=native#text/plain
 tests/webtbs/tw3841.pp svneol=native#text/plain
 tests/webtbs/tw3863.pp svneol=native#text/plain
 tests/webtbs/tw3863.pp svneol=native#text/plain

+ 23 - 0
tests/webtbs/tw38339.pp

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