unit test : suffixes
This commit is contained in:
parent
669caefccb
commit
02cadb882b
1 changed files with 25 additions and 0 deletions
|
@ -135,6 +135,17 @@ def mock_open(filename, mode):
|
|||
}
|
||||
}
|
||||
|
||||
configuration_suffix = {
|
||||
'enable': ['tcl'],
|
||||
'tcl': {
|
||||
'mpileaks': {
|
||||
'suffixes': {
|
||||
'+debug': 'foo',
|
||||
'~debug': 'bar'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HelperFunctionsTests(unittest.TestCase):
|
||||
|
||||
|
@ -282,6 +293,20 @@ def test_conflicts(self):
|
|||
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': {
|
||||
|
|
Loading…
Reference in a new issue