From a2a9146e9cb905782de92e9ef04c1fd7745f1cff Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Jun 2017 13:27:36 +0200 Subject: Convert test to new ln builtin --- tests/cc/modules/testscript | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'tests/cc') diff --git a/tests/cc/modules/testscript b/tests/cc/modules/testscript index d157336..c259014 100644 --- a/tests/cc/modules/testscript +++ b/tests/cc/modules/testscript @@ -47,8 +47,7 @@ EOI if $modules { -# Common source files that are symlinked (@@ TODO: ln builtin) in the -# test directories if used. +# Common source files that are symlinked in the test directories if used. # +cat <=core.mxx #ifndef LIBFOO_EXPORT @@ -80,7 +79,7 @@ EOI cp ../core.mxx ./ && cat >+core.mxx <+core.mxx <>EOE != 0 error: unresolved import for module foo.core EOE : misguessed : -cp ../core.mxx ./; +ln -s ../core.mxx ./; cat <'import bar.core;' >=driver.cxx; $* test &*.d <'exe{test}: cxx{driver} mxx{core}' 2>>EOE != 0 error: failed to correctly guess module name from mxx{core} @@ -180,7 +179,7 @@ $* test &*.d <'exe{test}: cxx{driver} mxx{core}' 2>>EOE != 0 : : Test importing a module from a library. : -cp ../core.mxx ../core.cxx ../driver.cxx ./; +ln -s ../core.mxx ../core.cxx ../driver.cxx ./; $* test clean <=driver.cxx; import foo.base; int main (int argc, char*[]) {return f (argc);} @@ -246,7 +245,7 @@ if ($cxx.id.type != "clang") : recursive : - cp ../base.mxx ../extra.mxx ../../core.mxx ../../core.cxx ./; + ln -s ../base.mxx ../extra.mxx ../../core.mxx ../../core.cxx ./; cat <=driver.cxx; import foo.extra; int main (int argc, char*[]) {return f (g (argc));} @@ -255,7 +254,7 @@ if ($cxx.id.type != "clang") : duplicate : - cp ../base.mxx ../extra.mxx ../foo.mxx ../../core.mxx ../../core.cxx ./; + ln -s ../base.mxx ../extra.mxx ../foo.mxx ../../core.mxx ../../core.cxx ./; cat <=driver.cxx; import foo; int main (int argc, char*[]) {return f (g (argc));} @@ -264,7 +263,7 @@ if ($cxx.id.type != "clang") : library : - cp ../base.mxx ../extra.mxx ../foo.mxx ../../core.mxx ../../core.cxx ./; + ln -s ../base.mxx ../extra.mxx ../foo.mxx ../../core.mxx ../../core.cxx ./; cat <=driver.cxx; import foo; int main (int argc, char*[]) {return f (g (argc));} @@ -279,7 +278,7 @@ if ($cxx.id.type != "clang") : : Test detection of module name to BMI resolution change. : -cp ../core.mxx ../core.cxx ../driver.cxx ./; +ln -s ../core.mxx ../core.cxx ../driver.cxx ./; cat <=foo-core.mxx; #if __cpp_modules >= 201704 export -- cgit v1.1