summaryrefslogtreecommitdiff
path: root/lib/spack/spack/test/spec_syntax.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/test/spec_syntax.py')
-rw-r--r--lib/spack/spack/test/spec_syntax.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py
index ab560bed08..cf1ce971d0 100644
--- a/lib/spack/spack/test/spec_syntax.py
+++ b/lib/spack/spack/test/spec_syntax.py
@@ -293,6 +293,12 @@ class TestSpecSyntax(object):
self.check_parse("x ^y", "x@: ^y@:")
+ def test_parse_redundant_deps(self):
+ self.check_parse("x ^y@foo", "x ^y@foo ^y@foo")
+ self.check_parse("x ^y@foo+bar", "x ^y@foo ^y+bar")
+ self.check_parse("x ^y@foo+bar", "x ^y@foo+bar ^y")
+ self.check_parse("x ^y@foo+bar", "x ^y ^y@foo+bar")
+
def test_parse_errors(self):
errors = ["x@@1.2", "x ^y@@1.2", "x@1.2::", "x::"]
self._check_raises(SpecParseError, errors)
@@ -481,7 +487,7 @@ class TestSpecSyntax(object):
self._check_raises(MultipleVersionError, multiples)
def test_duplicate_dependency(self):
- self._check_raises(DuplicateDependencyError, ["x ^y ^y"])
+ self._check_raises(DuplicateDependencyError, ["x ^y@1 ^y@2"])
def test_duplicate_compiler(self):
duplicates = [