aboutsummaryrefslogtreecommitdiff
path: root/tests/cc/modules/modules.testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-06 10:05:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-06 10:05:16 +0200
commit998d8ef439fd759e5c09a14729ad9748b58f55a0 (patch)
treefce14a6c987f4929cbed0cec137e175b607fddd5 /tests/cc/modules/modules.testscript
parente5a571d28f5ae7d78871ffdd16285aca9188ef83 (diff)
Improve module name to file name heuristics
Diffstat (limited to 'tests/cc/modules/modules.testscript')
-rw-r--r--tests/cc/modules/modules.testscript47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/cc/modules/modules.testscript b/tests/cc/modules/modules.testscript
index 87b104d..637e19e 100644
--- a/tests/cc/modules/modules.testscript
+++ b/tests/cc/modules/modules.testscript
@@ -85,6 +85,10 @@ $* test clean <<EOI
export module bar.core;
EOI
+ +cat <<EOI >=ext-core.mxx
+ export module foo.ext_core;
+ EOI
+
: separator
:
: Test separator equivalence.
@@ -120,6 +124,49 @@ $* test clean <<EOI
exe{test}: cxx{driver core} mxx{core baz}
mxx{baz}@./: cxx.module_name = foo.core
EOO
+
+ : secondary-entire
+ :
+ : Secondary score: core.mxx vs ext-core.mxx (entire file name consumed).
+ :
+ ln -s ../ext-core.mxx ../../core.mxx ../../core.cxx ../../driver.cxx ./;
+ $* test clean <'exe{test}: cxx{driver core} mxx{ext-core core}'
+
+ : secondary-dir-separator
+ :
+ : Secondary score: sub/core.mxx vs ext-core.mxx (stronger separator).
+ :
+ mkdir sub;
+ ln -s ../../core.mxx ../../core.cxx sub/;
+ ln -s ../ext-core.mxx ../../driver.cxx ./;
+ $* test clean <'exe{test}: cxx{driver} mxx{ext-core} sub/{mxx cxx}{core}'
+
+ : secondary-real-separator
+ :
+ : Secondary score: sub-core.mxx vs extcore.mxx (real separator).
+ :
+ ln -s ../ext-core.mxx extcore.mxx;
+ ln -s ../../core.mxx sub-core.mxx;
+ ln -s ../../core.cxx ../../driver.cxx ./;
+ $* test clean <'exe{test}: cxx{driver core} mxx{extcore sub-core}'
+
+ : secondary-case-separator
+ :
+ : Secondary score: SubCore.mxx vs extcore.mxx (case separator).
+ :
+ ln -s ../ext-core.mxx extcore.mxx;
+ ln -s ../../core.mxx SubCore.mxx;
+ ln -s ../../core.cxx ../../driver.cxx ./;
+ $* test clean <'exe{test}: cxx{driver core} mxx{extcore SubCore}'
+
+ : secondary-unmatched
+ :
+ : Secondary score: gtk-core.mxx vs gtk-ext-core.mxx (unmatched-length).
+ :
+ ln -s ../ext-core.mxx gtk-ext-core.mxx;
+ ln -s ../../core.mxx gtk-core.mxx;
+ ln -s ../../core.cxx ../../driver.cxx ./;
+ $* test clean <'exe{test}: cxx{driver core} mxx{gtk-ext-core gtk-core}'
}
: unresolved