* add testcase of issue #11006 to testsuite

git-svn-id: trunk@10493 -
This commit is contained in:
micha 2008-03-15 20:18:28 +00:00
parent ae8289f9f7
commit eae3754ab7
2 changed files with 40 additions and 0 deletions

1
.gitattributes vendored
View File

@ -8105,6 +8105,7 @@ tests/webtbs/tw1096.pp svneol=native#text/plain
tests/webtbs/tw10966.pp svneol=native#text/plain
tests/webtbs/tw1097.pp svneol=native#text/plain
tests/webtbs/tw10979.pp svneol=native#text/plain
tests/webtbs/tw11006.pp svneol=native#text/plain
tests/webtbs/tw1103.pp svneol=native#text/plain
tests/webtbs/tw1104.pp svneol=native#text/plain
tests/webtbs/tw1111.pp svneol=native#text/plain

39
tests/webtbs/tw11006.pp Normal file
View File

@ -0,0 +1,39 @@
{$mode objfpc}
uses
{$ifdef unix}
cthreads,
{$endif}
sysutils,
classes;
type
tmythread = class(tthread)
fs: ansistring;
constructor create(const s: ansistring);
procedure execute; override;
end;
constructor tmythread.create(const s: ansistring);
begin
fs:=s+'a';
freeonterminate:=true;
inherited create(true);
end;
procedure tmythread.execute;
begin
sleep(60);
writeln('done');
end;
var
a: array[1..100] of tmythread;
i: longint;
begin
for i:=low(a) to high(a) do
a[i]:=tmythread.create('b');
for i:=low(a) to high(a) do
a[i].resume;
sleep(60);
end.