@@ -27,8 +27,10 @@ func TestAst(t *testing.T) {
2727 ),
2828 NewHashAttribute (
2929 "add_field" ,
30- NewHashEntry ("fieldname" , NewStringAttribute ("" , "fieldvalue" , DoubleQuoted )),
31- NewHashEntry ("number" , NewNumberAttribute ("" , 3.1415 )),
30+ NewHashEntry (NewStringAttribute ("" , "bareword" , Bareword ), NewStringAttribute ("" , "bareword" , Bareword )),
31+ NewHashEntry (NewStringAttribute ("" , "single quoted" , SingleQuoted ), NewStringAttribute ("" , "single quoted" , SingleQuoted )),
32+ NewHashEntry (NewStringAttribute ("" , "double quoted" , DoubleQuoted ), NewStringAttribute ("" , "double quoted" , DoubleQuoted )),
33+ NewHashEntry (NewNumberAttribute ("" , 1 ), NewNumberAttribute ("" , 3.1415 )),
3234 ),
3335 NewNumberAttribute ("pi" , 3.1415 ),
3436 NewPluginAttribute ("codec" , NewPlugin ("rubydebug" , NewStringAttribute ("string" , "a value" , DoubleQuoted ))),
@@ -49,8 +51,10 @@ func TestAst(t *testing.T) {
4951 tag3
5052 ]
5153 add_field => {
52- fieldname => "fieldvalue"
53- number => 3.1415
54+ bareword => bareword
55+ 'single quoted' => 'single quoted'
56+ "double quoted" => "double quoted"
57+ 1 => 3.1415
5458 }
5559 pi => 3.1415
5660 codec => rubydebug {
@@ -531,7 +535,7 @@ output {
531535 nil ,
532536 NewStringAttribute ("foo" , "bar" , Bareword ),
533537 NewArrayAttribute ("nil" , nil ),
534- NewHashAttribute ("nilHash" , NewHashEntry (" nilEntry" , nil )),
538+ NewHashAttribute ("nilHash" , NewHashEntry (NewStringAttribute ( "" , " nilEntry", Bareword ) , nil )),
535539 nil ,
536540 ),
537541 NewBranch (
0 commit comments