+ test for previous commit with main program linking to libc

(apparently already works after all :)

git-svn-id: trunk@10496 -
This commit is contained in:
Jonas Maebe 2008-03-15 23:53:55 +00:00
parent 3eec0569be
commit b4d59bf0fb
3 changed files with 46 additions and 1 deletions

1
.gitattributes vendored
View File

@ -8921,6 +8921,7 @@ tests/webtbs/tw8685.pp svneol=native#text/plain
tests/webtbs/tw8730a.pp svneol=native#text/plain
tests/webtbs/tw8730b.pp svneol=native#text/plain
tests/webtbs/tw8730c.pp svneol=native#text/plain
tests/webtbs/tw8730d.pp svneol=native#text/plain
tests/webtbs/tw8757.pp svneol=native#text/plain
tests/webtbs/tw8777f.pp svneol=native#text/plain
tests/webtbs/tw8777g.pp svneol=native#text/plain

View File

@ -17,9 +17,17 @@ const
function Lib2Func: pchar; CDecl; external libname name 'Lib2Func';
var
error: byte;
begin
error:=0;
WriteLn( Lib2Func );
if not(fileexists('tw8730a.txt')) or
not(fileexists('tw8730b.txt')) then
halt(1);
error:=1;
if (fileexists('tw8730a.txt')) then
deletefile('tw8730a.txt');
if (fileexists('tw8730b.txt')) then
deletefile('tw8730b.txt');
halt(error);
end.

36
tests/webtbs/tw8730d.pp Normal file
View File

@ -0,0 +1,36 @@
{ %target=win32,win64,wince,darwin,linux,freebsd,solaris,beos}
{ %NEEDLIBRARY }
{ same as tw8730c, but linking to libc so it uses different }
{ startup code }
{$mode delphi}
program MainApp;
uses
initc, sysutils;
const
{$ifdef windows}
libname='tw8730b.dll';
{$else}
libname='tw8730b';
{$linklib tw8730b}
{$endif}
function Lib2Func: pchar; CDecl; external libname name 'Lib2Func';
var
error: byte;
begin
error:=0;
WriteLn( Lib2Func );
if not(fileexists('tw8730a.txt')) or
not(fileexists('tw8730b.txt')) then
error:=1;
if (fileexists('tw8730a.txt')) then
deletefile('tw8730a.txt');
if (fileexists('tw8730b.txt')) then
deletefile('tw8730b.txt');
halt(error);
end.