Browse Source

+ 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 -
svenbarth 9 years ago
parent
commit
9fb2a8bba9
2 changed files with 47 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 46 0
      tests/tbs/tb0619.pp

+ 1 - 0
.gitattributes

@@ -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 - 0
tests/tbs/tb0619.pp

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