Browse Source

+ test from mantis #28667

git-svn-id: trunk@33103 -
Jonas Maebe 9 years ago
parent
commit
001417bb47
2 changed files with 31 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 30 0
      tests/webtbs/tw28667.pp

+ 1 - 0
.gitattributes

@@ -14875,6 +14875,7 @@ tests/webtbs/tw28632.pp -text svneol=native#text/plain
 tests/webtbs/tw28641.pp svneol=native#text/plain
 tests/webtbs/tw28641.pp svneol=native#text/plain
 tests/webtbs/tw2865.pp svneol=native#text/plain
 tests/webtbs/tw2865.pp svneol=native#text/plain
 tests/webtbs/tw28650.pp svneol=native#text/pascal
 tests/webtbs/tw28650.pp svneol=native#text/pascal
+tests/webtbs/tw28667.pp svneol=native#text/plain
 tests/webtbs/tw28674.pp svneol=native#text/pascal
 tests/webtbs/tw28674.pp svneol=native#text/pascal
 tests/webtbs/tw28702.pp svneol=native#text/plain
 tests/webtbs/tw28702.pp svneol=native#text/plain
 tests/webtbs/tw28713.pp svneol=native#text/pascal
 tests/webtbs/tw28713.pp svneol=native#text/pascal

+ 30 - 0
tests/webtbs/tw28667.pp

@@ -0,0 +1,30 @@
+{%CPU=i386}
+{%OPT=-O2 -Cg}
+
+{$mode delphi}
+program a;
+
+type
+  TChars=set of AnsiChar;
+
+function get_char(var buf;var ofs:integer;const max:integer;const st:TChars):AnsiChar;
+var
+  rbuf:array[0..0] of AnsiChar absolute buf;
+begin
+  result:=#$20;
+  while (ofs<max) and  (rbuf[ofs] in st) do
+  begin
+    Result:=rbuf[ofs];
+    inc(ofs);
+    break;
+  end;
+end;
+
+var
+ ofs:integer;
+ buf:array[0..100] of ansichar;
+
+begin
+  ofs:=0;
+  get_char(buf,ofs,100,['=','*'])
+end.