summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/parser_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/parser_spec.rb')
-rwxr-xr-xspec/unit/parser/parser_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/parser_spec.rb b/spec/unit/parser/parser_spec.rb
index 2f5d4b8ea..6cc393d91 100755
--- a/spec/unit/parser/parser_spec.rb
+++ b/spec/unit/parser/parser_spec.rb
@@ -76,6 +76,12 @@ describe Puppet::Parser do
end
+ describe "when parsing selector" do
+ it "should support hash access on the left hand side" do
+ lambda { @parser.parse("$h = { 'a' => 'b' } $a = $h['a'] ? { 'b' => 'd', default => undef }") }.should_not raise_error
+ end
+ end
+
describe "when parsing 'if'" do
it "not, it should create the correct ast objects" do
ast::Not.expects(:new).with { |h| h[:value].is_a?(ast::Boolean) }