2
0
Эх сурвалжийг харах

+ tests for iso like goto

git-svn-id: trunk@15710 -
florian 15 жил өмнө
parent
commit
5d01b7b504

+ 4 - 0
.gitattributes

@@ -9237,6 +9237,10 @@ tests/test/tinterface6.pp svneol=native#text/plain
 tests/test/tinterrupt.pp svneol=native#text/plain
 tests/test/tinterrupt.pp svneol=native#text/plain
 tests/test/tintfdef.pp svneol=native#text/plain
 tests/test/tintfdef.pp svneol=native#text/plain
 tests/test/tintuint.pp svneol=native#text/plain
 tests/test/tintuint.pp svneol=native#text/plain
+tests/test/tisogoto1.pp svneol=native#text/pascal
+tests/test/tisogoto2.pp svneol=native#text/pascal
+tests/test/tisogoto3.pp svneol=native#text/pascal
+tests/test/tisogoto4.pp svneol=native#text/pascal
 tests/test/tlib1a.pp svneol=native#text/plain
 tests/test/tlib1a.pp svneol=native#text/plain
 tests/test/tlib1b.pp svneol=native#text/plain
 tests/test/tlib1b.pp svneol=native#text/plain
 tests/test/tlibrary1.pp svneol=native#text/plain
 tests/test/tlibrary1.pp svneol=native#text/plain

+ 33 - 0
tests/test/tisogoto1.pp

@@ -0,0 +1,33 @@
+{$mode iso}
+procedure test;
+  label
+    1;
+  procedure p;
+    begin
+      goto 1;
+      halt(1);
+    end;
+  begin
+    p;
+    halt(1);
+  1:
+  end;
+
+
+label
+  1;
+
+procedure p;
+  begin
+    goto 1;
+    halt(1);
+  end;
+
+begin
+  test;
+  p;
+  halt(1);
+1:
+  writeln('ok');
+end.
+

+ 19 - 0
tests/test/tisogoto2.pp

@@ -0,0 +1,19 @@
+{ %fail }
+{$mode iso}
+program tisogoto2(output);
+label
+  1;
+
+procedure p1;
+  begin
+  1:
+  end;
+  
+procedure p2;
+  begin
+    goto 1;
+  end;
+  
+begin
+  p2;
+end.

+ 14 - 0
tests/test/tisogoto3.pp

@@ -0,0 +1,14 @@
+{ %fail }
+{$mode iso}
+unit tisogoto3;
+
+  interface
+
+    label
+      1;
+      
+  implementation
+  
+end.
+
+   

+ 21 - 0
tests/test/tisogoto4.pp

@@ -0,0 +1,21 @@
+{ %fail }
+{$mode iso}
+unit tisogoto4;
+
+  interface
+
+  implementation
+  
+    label
+      1;
+
+    procedure p;
+      begin
+        goto 1;
+      end;        
+
+begin
+  1:      
+end.
+
+