From 9ce75d1713706f41f01290313b80aa26d713b9f2 Mon Sep 17 00:00:00 2001 From: jnthn Date: Fri, 13 Jan 2012 15:10:46 +0100 Subject: [PATCH] Add a library that can compile very simple C libraries for usage during testing. --- t/CompileTestLib.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 t/CompileTestLib.pm diff --git a/t/CompileTestLib.pm b/t/CompileTestLib.pm new file mode 100644 index 0000000..72e3855 --- /dev/null +++ b/t/CompileTestLib.pm @@ -0,0 +1,11 @@ +module t::CompileTestLib; + +sub compile_test_lib($name) is export { + my $o = $*VM; + my $so = $*VM; + my $c_line = "$*VM -c $*VM$name$o $*VM t/$name.c"; + my $l_line = "$*VM $*VM $*VM " ~ + "$*VM $*VM$name$so $name$o"; + shell($c_line); + shell($l_line); +}