+ Test for System.Delete() with Size argument equal to MaxInt, Mantis #17514

git-svn-id: trunk@16093 -
This commit is contained in:
sergei 2010-10-06 17:33:29 +00:00
parent 1e11244ddf
commit 1f215ecc86
2 changed files with 36 additions and 0 deletions

1
.gitattributes vendored
View File

@ -10689,6 +10689,7 @@ tests/webtbs/tw17402a.pp svneol=native#text/pascal
tests/webtbs/tw17413.pp svneol=native#text/plain
tests/webtbs/tw17430.pp svneol=native#text/plain
tests/webtbs/tw1744.pp svneol=native#text/plain
tests/webtbs/tw17514.pp svneol=native#text/plain
tests/webtbs/tw17546.pp svneol=native#text/plain
tests/webtbs/tw1754c.pp svneol=native#text/plain
tests/webtbs/tw1755.pp svneol=native#text/plain

35
tests/webtbs/tw17514.pp Normal file
View File

@ -0,0 +1,35 @@
{$ifdef fpc}
{$mode objfpc}{$h+}
{$endif}
var
a: ansistring;
s: shortstring;
{$ifdef fpc}
u: unicodestring;
{$endif}
w: widestring;
code: Integer;
begin
code := 0;
a := 'foo bar';
delete(a, 4, maxint);
if a <> 'foo' then
code := code or 1;
s := 'foo bar';
delete(s, 4, maxint);
if s <> 'foo' then
code := code or 2;
w := 'foo bar';
delete(w, 4, maxint);
if w <> 'foo' then
code := code or 4;
{$ifdef fpc}
u := 'foo bar';
delete(u, 4, maxint);
if u <> 'foo' then
code := code or 8;
{$endif}
Halt(code);
end.