Pārlūkot izejas kodu

* add check if pos(ansistring) still works

peter 22 gadi atpakaļ
vecāks
revīzija
bdb7c4f84f
1 mainītis faili ar 14 papildinājumiem un 1 dzēšanām
  1. 14 1
      tests/tbs/tb0429.pp

+ 14 - 1
tests/tbs/tb0429.pp

@@ -19,14 +19,27 @@ end;
 
 
 var
 var
   w : widestring;
   w : widestring;
+  s : ansistring;
+  i : longint;
 begin
 begin
   err:=true;
   err:=true;
   { this should choosse the shortstring version }
   { this should choosse the shortstring version }
   lowercase(w);
   lowercase(w);
   if err then
   if err then
    begin
    begin
-     writeln('ERROR!');
+     writeln('Wrong lowercase Error!');
      halt(1);
      halt(1);
    end;
    end;
+
+   { check if ansistring pos() call is not broken }
+   s:='';
+   for i:=1 to 300 do s:=s+'.';
+   s:=s+'test';
+   if pos('test',s)<>301 then
+    begin
+      writeln('Pos(ansistring) Error!');
+      halt(1);
+    end;
+
 end.
 end.