From 6d05cbc1e1a22d4316e18fb22d5cff9c7a42d3cf Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Thu, 16 Oct 2008 22:02:37 +0200 Subject: Fix #936 - Allow trailing comma in array definition Signed-off-by: Brice Figureau --- spec/unit/parser/parser.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/unit/parser') diff --git a/spec/unit/parser/parser.rb b/spec/unit/parser/parser.rb index 6ede8e6d1..07aad588d 100755 --- a/spec/unit/parser/parser.rb +++ b/spec/unit/parser/parser.rb @@ -162,6 +162,14 @@ describe Puppet::Parser do 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 + + describe Puppet::Parser, "when parsing arrays with trailing comma" do + + it "should not raise errors with a trailing comma" do + lambda { @parser.parse("$a = [1,2,]") }.should_not raise_error end end -- cgit