Forráskód Böngészése

+ test for #9073

git-svn-id: trunk@8267 -
Jonas Maebe 18 éve
szülő
commit
abd3ce841a
2 módosított fájl, 41 hozzáadás és 0 törlés
  1. 1 0
      .gitattributes
  2. 40 0
      tests/webtbs/tw9073.pp

+ 1 - 0
.gitattributes

@@ -8343,6 +8343,7 @@ tests/webtbs/tw8975a.pp svneol=native#text/plain
 tests/webtbs/tw8977.pp svneol=native#text/plain
 tests/webtbs/tw9054.pp svneol=native#text/plain
 tests/webtbs/tw9059.pp svneol=native#text/plain
+tests/webtbs/tw9073.pp svneol=native#text/plain
 tests/webtbs/tw9076.pp svneol=native#text/plain
 tests/webtbs/tw9076a.pp svneol=native#text/plain
 tests/webtbs/tw9085.pp svneol=native#text/plain

+ 40 - 0
tests/webtbs/tw9073.pp

@@ -0,0 +1,40 @@
+{$mode objfpc}
+
+uses
+{$ifdef unix}
+  cthreads,
+{$endif}
+  SysUtils, Classes;
+
+type
+  tc = class(tthread)
+    procedure execute; override;
+  end;
+
+var
+  caught: boolean;
+
+procedure tc.execute;
+type
+  plongint = ^longint;
+var
+  p: plongint;
+begin
+  p:=nil;
+  try
+    writeln(p^);
+  except
+    caught:=true;
+  end;
+end;
+
+var
+  c: tc;
+begin
+  caught:=false;
+  c:=tc.create(false);
+  c.waitfor;
+  c.free;
+  halt(ord(not caught));
+end.
+