+ test from mantis #28667

git-svn-id: trunk@33103 -
This commit is contained in:
Jonas Maebe 2016-02-18 21:58:34 +00:00
parent 2a33ee63bb
commit 001417bb47
2 changed files with 31 additions and 0 deletions

1
.gitattributes vendored
View File

@ -14875,6 +14875,7 @@ tests/webtbs/tw28632.pp -text svneol=native#text/plain
tests/webtbs/tw28641.pp svneol=native#text/plain
tests/webtbs/tw2865.pp svneol=native#text/plain
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/tw28702.pp svneol=native#text/plain
tests/webtbs/tw28713.pp svneol=native#text/pascal

30
tests/webtbs/tw28667.pp Normal file
View File

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