mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- regression test to ensure single-quoted values as attribute names is
valid.
This commit is contained in:
parent
d49b308211
commit
87a4391924
1 changed files with 21 additions and 0 deletions
21
spec/config.rb
Normal file
21
spec/config.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue