summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/test/modules.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py
index f695bf75f1..7f4643409e 100644
--- a/lib/spack/spack/test/modules.py
+++ b/lib/spack/spack/test/modules.py
@@ -135,6 +135,17 @@ configuration_wrong_conflicts = {
}
}
+configuration_suffix = {
+ 'enable': ['tcl'],
+ 'tcl': {
+ 'mpileaks': {
+ 'suffixes': {
+ '+debug': 'foo',
+ '~debug': 'bar'
+ }
+ }
+ }
+}
class HelperFunctionsTests(unittest.TestCase):
@@ -282,6 +293,20 @@ class TclTests(MockPackagesTest):
spack.modules.CONFIGURATION = configuration_wrong_conflicts
self.assertRaises(SystemExit, self.get_modulefile_content, spec)
+
+ def test_suffixes(self):
+ spack.modules.CONFIGURATION = configuration_suffix
+ spec = spack.spec.Spec('mpileaks+debug arch=x86-linux')
+ spec.concretize()
+ generator = spack.modules.TclModule(spec)
+ self.assertTrue('foo' in generator.use_name)
+
+ spec = spack.spec.Spec('mpileaks~debug arch=x86-linux')
+ spec.concretize()
+ generator = spack.modules.TclModule(spec)
+ self.assertTrue('bar' in generator.use_name)
+
+
configuration_dotkit = {
'enable': ['dotkit'],
'dotkit': {