diff --git a/tests/test/tlibrary.pp b/tests/test/tlibrary.pp index 0cb5ed57b2..4969d8c257 100644 --- a/tests/test/tlibrary.pp +++ b/tests/test/tlibrary.pp @@ -1,5 +1,9 @@ +{ %OPT=-FE. } { %NORUN } +{ The .so of the library needs to be in the current dir when + testing the loading at runtime } + {$ifdef win32} {$define supported} {$define supportidx} @@ -7,6 +11,9 @@ {$ifdef Unix} {$define supported} {$endif Unix} +{$ifndef fpc} + {$define supported} +{$endif} {$ifdef supported} @@ -19,6 +26,7 @@ const procedure Test;export; begin + writeln('Hoi'); end; exports diff --git a/tests/test/tlibrary2.pp b/tests/test/tlibrary2.pp new file mode 100644 index 0000000000..68b15c1f93 --- /dev/null +++ b/tests/test/tlibrary2.pp @@ -0,0 +1,22 @@ +{ %NEEDLIBRARY } + +{ Test program to test linking to fpc library } + +{$ifdef win32} + {$define supported} +{$endif win32} +{$ifdef Unix} + {$define supported} +{$endif Unix} +{$ifndef fpc} + {$define supported} +{$endif} + +{$ifdef supported} + +procedure test;external 'libtlibrary.so' name 'TestName'; + +begin + test; +end. +{$endif supported}