aboutsummaryrefslogtreecommitdiff
path: root/tests/cc/modules/headers.testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-06-05 08:52:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-06-05 11:48:23 +0200
commit2a335eb05de3d26eb131a2112b7fcc2124def3b7 (patch)
tree5ace78d76938d56b597a43e13857e0e5be1388ba /tests/cc/modules/headers.testscript
parentaa5cd714e60ddd7a6af93576bc3450d1cd9ff3b1 (diff)
Adjust GCC module mapper to new protocol
Diffstat (limited to 'tests/cc/modules/headers.testscript')
-rw-r--r--tests/cc/modules/headers.testscript35
1 files changed, 31 insertions, 4 deletions
diff --git a/tests/cc/modules/headers.testscript b/tests/cc/modules/headers.testscript
index 4b8067f..4fb9a42 100644
--- a/tests/cc/modules/headers.testscript
+++ b/tests/cc/modules/headers.testscript
@@ -9,15 +9,36 @@
+$headers || exit
-: include-translation
-:
-cat <<EOI >=core.hxx;
+# Common source files that are symlinked in the test directories if used.
+#
++cat <<EOI >=core.hxx
#ifdef CORE_IN
# error macro isolation
#endif
#define CORE_OUT 1
inline int f () {return 1;}
EOI
+
+: import
+:
+#ln -s ../core.hxx ./; @@ why isn't working?
+cp ../core.hxx ./;
+cat <<EOI >=driver.cxx;
+ #define CORE_IN 1
+ import "core.hxx";
+ #ifndef CORE_OUT
+ # error macro export
+ #endif
+ int main () {return f () - CORE_OUT;}
+ EOI
+$* test clean <<EOI
+ exe{test}: cxx{driver}
+ EOI
+
+: include-translation
+:
+#ln -s ../core.hxx ./; @@ why isn't working?
+cp ../core.hxx ./;
cat <<EOI >=driver.cxx;
#define CORE_IN 1
#include "core.hxx"
@@ -26,6 +47,12 @@ cat <<EOI >=driver.cxx;
#endif
int main () {return f () - CORE_OUT;}
EOI
-$* test clean config.cxx.importable_headers="$~/core.hxx" &$~/../build/cc/*** <<EOI
+$* test clean config.cxx.importable_headers="$~/core.hxx" <<EOI
exe{test}: cxx{driver}
EOI
+
+# Clean module sidebuilds.
+#
+-$* clean <<EOI
+./:
+EOI