From 1c7cbb302b1c6e41eb0c5cecfc655532f1919cba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 28 Jul 2017 13:46:26 +0200 Subject: Implement support for linking whole archive --- tests/cc/libu/testscript | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'tests/cc') diff --git a/tests/cc/libu/testscript b/tests/cc/libu/testscript index 454a443..78a3eb3 100644 --- a/tests/cc/libu/testscript +++ b/tests/cc/libu/testscript @@ -7,6 +7,10 @@ test.arguments = config.cxx="$recall($cxx.path)" .include ../../common.test ++cat <+build/bootstrap.build +using test +EOI + +cat <=build/root.build cxx.std = latest @@ -14,6 +18,8 @@ using cxx hxx{*}: extension = hxx cxx{*}: extension = cxx + +exe{*}: test = true EOI # Common source files that are symlinked in the test directories if used. @@ -23,24 +29,40 @@ EOI # define LIBFOO_EXPORT #endif - LIBFOO_EXPORT void f (); + LIBFOO_EXPORT extern int f; EOI +cat <=foo.cxx - void f () {} + #include + int f; + EOI + ++cat <=bar.cxx + #include + struct b { b () {++f;} } b_; EOI +cat <=driver.cxx + #include #include - int main () {f ();} + int main () {assert (f != 0);} + EOI + +: basic +: +ln -s ../foo.hxx ../foo.cxx ../bar.cxx ../driver.cxx ./; +$* test clean <