Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test calling a function from libc.

This isn't necessary on Linux, but OS X distinguishes between shared libraries
(dylibs) and loadable modules (bundles), which we need to make sure works.
This closes #7.
  • Loading branch information...
commit 20e96d507cf0beca5a175b2648a6b2d1db5dc685 1 parent aa0436c
@arnsholt arnsholt authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 t/02-simple-args.t
View
8 t/02-simple-args.t
@@ -2,7 +2,7 @@ use lib '.';
use t::CompileTestLib;
use NativeCall;
-say "1..11";
+say "1..12";
compile_test_lib('02-simple-args');
@@ -38,4 +38,10 @@ sub wrapper(int $arg) { wrapped($arg) }
wrapper(1);
+# Make sure we can call functions from the C library. Not an issue on Linux,
+# but OS X has a distinction between shared libraries (dylibs) and loadable
+# modules (bundles) which we need to check.
+sub printf(Str) is native('libc') { * }
+printf('ok 12 - printf(3) from libc');
+
# vim:ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.