mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 05:48:59 +02:00
+ Test for System.Delete() with Size argument equal to MaxInt, Mantis #17514
git-svn-id: trunk@16093 -
This commit is contained in:
parent
1e11244ddf
commit
1f215ecc86
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
35
tests/webtbs/tw17514.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user