summaryrefslogtreecommitdiffstats
path: root/test/language
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-27 23:22:09 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-27 23:22:09 +0000
commiteda9d955b3fb2bbe5d7ca2cc3f7802d5fb9395ef (patch)
treeb078cd5c83f969c1eab0c017b750e8b5c25b460d /test/language
parent56116c2aa64ccbbc6740d30b5901b2700bcae036 (diff)
downloadpuppet-eda9d955b3fb2bbe5d7ca2cc3f7802d5fb9395ef.tar.gz
puppet-eda9d955b3fb2bbe5d7ca2cc3f7802d5fb9395ef.tar.xz
puppet-eda9d955b3fb2bbe5d7ca2cc3f7802d5fb9395ef.zip
Fixing #64; multiple class definitions in the same scope is now an error, although using the same class name in different scopes is not an error.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@956 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/language')
-rwxr-xr-xtest/language/scope.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/language/scope.rb b/test/language/scope.rb
index b4a546267..ee896ab32 100755
--- a/test/language/scope.rb
+++ b/test/language/scope.rb
@@ -411,7 +411,25 @@ class TestScope < Test::Unit::TestCase
assert_equal("bin", file["owner"], "Value did not override correctly")
}
end
+
+ def test_multipletypes
+ scope = Puppet::Parser::Scope.new()
+ children = []
- def test_classscopes
+ # create the parent class
+ children << classobj("aclass")
+ children << classobj("aclass")
+ top = nil
+ assert_nothing_raised("Could not create top object") {
+ top = AST::ASTArray.new(
+ :children => children
+ )
+ }
+
+ scope = nil
+ assert_raise(Puppet::ParseError) {
+ scope = Puppet::Parser::Scope.new()
+ objects = top.evaluate(:scope => scope)
+ }
end
end