From 8c821c09eebe117bd8b100b6dc416ded0588b979 Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 27 Feb 2006 22:21:44 +0000 Subject: Mostly, this is a refactoring commit. There is one significant new feature, though: overrides now only work within a class heirarchy, which is to say that a subclass can override an element in a base class, but a child scope cannot otherwise override an element in a base scope. I've also done a good bit of refactoring, though; notably, AST#evaluate now takes named arguments, and I changed the 'name' parameter to 'type' in all of the Component classes (this was all internal, but was confusing as it was). I also removed the need for the autonaming stuff -- it's now acceptable for components not to have names, and everything behaves correctly. I haven't yet removed the autoname code, though; I'll do that on the next commit. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@952 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/parser/parser.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/parser') diff --git a/test/parser/parser.rb b/test/parser/parser.rb index ab8366ba8..e29057e06 100644 --- a/test/parser/parser.rb +++ b/test/parser/parser.rb @@ -42,7 +42,8 @@ class TestParser < Test::Unit::TestCase Puppet.debug("parsing failer %s" % file) if __FILE__ == $0 assert_raise(Puppet::ParseError) { @parser.file = file - @parser.parse + ast = @parser.parse + Puppet::Parser::Scope.new.evaluate(:ast => ast) } Puppet::Type.allclear } @@ -168,7 +169,7 @@ class TestParser < Test::Unit::TestCase scope = Puppet::Parser::Scope.new() scope.name = "parsetest" scope.type = "parsetest" - objects = scope.evaluate(ast) + objects = scope.evaluate(:ast => ast) } method = nil -- cgit