diff options
| author | Luke Kanies <luke@madstop.com> | 2008-12-02 16:26:54 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-12-02 16:26:54 -0600 |
| commit | 99a9b5a045af6f1c68619792a45603cbe450652d (patch) | |
| tree | 579963d464c0529d4e9250f937d495e415f1e867 /test/language | |
| parent | f73e13e7464edab73443857d628602b89361c220 (diff) | |
| parent | 278bfe83015312292360f727d6532a143610db0d (diff) | |
| download | puppet-99a9b5a045af6f1c68619792a45603cbe450652d.tar.gz puppet-99a9b5a045af6f1c68619792a45603cbe450652d.tar.xz puppet-99a9b5a045af6f1c68619792a45603cbe450652d.zip | |
Merge branch '0.24.x'
Conflicts:
bin/puppetca
lib/puppet/type/group.rb
lib/puppet/type/tidy.rb
lib/puppet/util/settings.rb
Also edited the following files so tests will pass:
lib/puppet/type/component.rb
spec/unit/ssl/certificate_request.rb
spec/unit/type/computer.rb
spec/unit/type/mcx.rb
spec/unit/type/resources.rb
spec/unit/util/settings.rb
spec/unit/util/storage.rb
test/ral/type/zone.rb
Diffstat (limited to 'test/language')
| -rwxr-xr-x | test/language/functions.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/language/functions.rb b/test/language/functions.rb index d9a1a561d..7e153ec3d 100755 --- a/test/language/functions.rb +++ b/test/language/functions.rb @@ -12,7 +12,7 @@ class TestLangFunctions < Test::Unit::TestCase include PuppetTest::ParserTesting include PuppetTest::ResourceTesting def test_functions - assert_raise(Puppet::ParseError) do + assert_nothing_raised do Puppet::Parser::AST::Function.new( :name => "fakefunction", :arguments => AST::ASTArray.new( @@ -21,6 +21,16 @@ class TestLangFunctions < Test::Unit::TestCase ) end + assert_raise(Puppet::ParseError) do + func = Puppet::Parser::AST::Function.new( + :name => "fakefunction", + :arguments => AST::ASTArray.new( + :children => [nameobj("avalue")] + ) + ) + func.evaluate(mkscope) + end + assert_nothing_raised do Puppet::Parser::Functions.newfunction(:fakefunction, :type => :rvalue) do |input| return "output %s" % input[0] |
