+ added simple test to check whether Delete() and Insert() still work correctly (though a mistake there would probably have broken the cycling totally anyway...)

git-svn-id: trunk@33896 -
This commit is contained in:
svenbarth 2016-06-03 21:38:29 +00:00
parent a2c9c75e97
commit 9fb2a8bba9
2 changed files with 47 additions and 0 deletions

1
.gitattributes vendored
View File

@ -10964,6 +10964,7 @@ tests/tbs/tb0615.pp svneol=native#text/pascal
tests/tbs/tb0616.pp svneol=native#text/pascal
tests/tbs/tb0617.pp svneol=native#text/pascal
tests/tbs/tb0618.pp svneol=native#text/plain
tests/tbs/tb0619.pp svneol=native#text/pascal
tests/tbs/tb205.pp svneol=native#text/plain
tests/tbs/tb610.pp svneol=native#text/pascal
tests/tbs/tb613.pp svneol=native#text/plain

46
tests/tbs/tb0619.pp Normal file
View File

@ -0,0 +1,46 @@
program tb0619;
var
ss: ShortString;
us: UnicodeString;
ws: WideString;
as: AnsiString;
i: LongInt;
begin
ss := 'Test';
Delete(ss, 2, 1);
if ss <> 'Tst' then
Halt(1);
Insert('Foo', ss, 2);
if ss <> 'TFoost' then
Halt(2);
us := 'Test';
Delete(us, 2, 1);
if us <> 'Tst' then
Halt(3);
Insert('Foo', us, 2);
if ss <> 'TFoost' then
Halt(4);
ws := 'Test';
Delete(ws, 2, 1);
if ws <> 'Tst' then
Halt(5);
Insert('Foo', ws, 2);
if ss <> 'TFoost' then
Halt(6);
as := 'Test';
Delete(as, 2, 1);
if as <> 'Tst' then
Halt(7);
Insert('Foo', as, 2);
if ss <> 'TFoost' then
Halt(8);
ss := 'Test';
Insert(#$41, ss, 2);
if ss <> 'TAest' then
Halt(9);
end.