diff options
Diffstat (limited to 'spec/unit/parser/parser.rb')
-rwxr-xr-x | spec/unit/parser/parser.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/unit/parser/parser.rb b/spec/unit/parser/parser.rb index c0d22a2cc..6ede8e6d1 100755 --- a/spec/unit/parser/parser.rb +++ b/spec/unit/parser/parser.rb @@ -142,4 +142,28 @@ describe Puppet::Parser do end + describe Puppet::Parser, "when parsing function calls" do + + it "should not raise errors with no arguments" do + lambda { @parser.parse("tag()") }.should_not raise_error + end + + it "should not raise errors with rvalue function with no args" do + lambda { @parser.parse("$a = template()") }.should_not raise_error + end + + it "should not raise errors with arguments" do + lambda { @parser.parse("notice(1)") }.should_not raise_error + end + + it "should not raise errors with multiple arguments" do + lambda { @parser.parse("notice(1,2)") }.should_not raise_error + end + + it "should not raise errors with multiple arguments and a trailing comma" do + lambda { @parser.parse("notice(1,2,)") }.should_not raise_error + end + + end + end |