Parcourir la source

* add test for charray=nil

peter il y a 22 ans
Parent
commit
7c22c8184b
1 fichiers modifiés avec 5 ajouts et 4 suppressions
  1. 5 4
      tests/tbs/tb0446.pp

+ 5 - 4
tests/tbs/tb0446.pp

@@ -3,10 +3,11 @@ var
   pc : pchar;
 begin
   a:='1';
+  if a=nil then
+   halt(1);
   pc:=@a;
-  if pc='1' then
-    writeln('OK')
-  else
-    halt(1);
+  if pc<>'1' then
+   halt(1);
+  writeln('OK')
 end.