Browse Source

+ tests from mantis #6586, already work after the previous shared
library fixes

git-svn-id: trunk@10559 -

Jonas Maebe 17 years ago
parent
commit
61df38ae9b
3 changed files with 43 additions and 0 deletions
  1. 2 0
      .gitattributes
  2. 19 0
      tests/webtbs/tw6586a.pp
  3. 22 0
      tests/webtbs/tw6586b.pp

+ 2 - 0
.gitattributes

@@ -8787,6 +8787,8 @@ tests/webtbs/tw6491.pp svneol=native#text/plain
 tests/webtbs/tw6493.pp svneol=native#text/plain
 tests/webtbs/tw6525.pp -text
 tests/webtbs/tw6543.pp svneol=native#text/plain
+tests/webtbs/tw6586a.pp svneol=native#text/plain
+tests/webtbs/tw6586b.pp svneol=native#text/plain
 tests/webtbs/tw6624.pp svneol=native#text/plain
 tests/webtbs/tw6641.pp svneol=native#text/plain
 tests/webtbs/tw6684.pp svneol=native#text/plain

+ 19 - 0
tests/webtbs/tw6586a.pp

@@ -0,0 +1,19 @@
+{ %target=win32,win64,wince,darwin,linux,freebsd,solaris,beos }
+{ %norun }
+
+library tw6586a;
+{$H+}{$MODE OBJFPC}
+
+uses cmem;
+
+procedure ExportTest1(input: longint); stdcall;
+begin
+ input:= 5;
+end;
+
+exports
+  ExportTest1;
+
+begin
+end.
+

+ 22 - 0
tests/webtbs/tw6586b.pp

@@ -0,0 +1,22 @@
+{ %target=win32,win64,wince,darwin,linux,freebsd,solaris,beos }
+{ %needlibrary }
+
+program project1;
+
+{$mode objfpc}{$H+}
+
+uses cmem;
+
+const
+{$ifdef windows}
+  libname='tw6586a.dll';
+{$else}
+  libname='tw6586a';
+  {$linklib tw6586a}
+{$endif}
+
+procedure ExportTest1(input: longint); stdcall; external libname;
+
+begin
+  writeln('Watch for Seg fault on closing');
+end.