From 87a4391924d2d66b8128e50644c8b0479796ec75 Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Tue, 3 Sep 2013 09:08:22 -0700 Subject: [PATCH] - regression test to ensure single-quoted values as attribute names is valid. --- spec/config.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 spec/config.rb diff --git a/spec/config.rb b/spec/config.rb new file mode 100644 index 000000000..5eb144da3 --- /dev/null +++ b/spec/config.rb @@ -0,0 +1,21 @@ +# config syntax tests +# + +require "logstash/config/grammar" +require "logstash/config/config_ast" + +describe LogStashConfigParser do + it "should permit single-quoted attribute names" do + parser = LogStashConfigParser.new + config = parser.parse(%q( + input { + example { + 'foo' => 'bar' + test => { 'bar' => 'baz' } + } + } + )) + + reject { config }.nil? + end +end