@@ -86,12 +86,12 @@ def test_output_type_hash
86
86
d = create_driver ( CONFIG + config_element ( "" , "" , { "output_type" => "hash" } ) )
87
87
etime = event_time ( "2016-10-07 21:09:31.012345678 UTC" )
88
88
out = capture_log ( d ) { filter ( d , etime , { 'test' => 'test' } ) }
89
- assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>\" test\" }\n " , out
89
+ assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>\" test\" }\n " , out . gsub ( ' => ' , '=>' )
90
90
91
91
# NOTE: Float::NAN is not jsonable, but hash string can output it.
92
92
d = create_driver ( CONFIG + config_element ( "" , "" , { "output_type" => "hash" } ) )
93
93
out = capture_log ( d ) { filter ( d , etime , { 'test' => Float ::NAN } ) }
94
- assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>NaN}\n " , out
94
+ assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>NaN}\n " , out . gsub ( ' => ' , '=>' )
95
95
end
96
96
97
97
# Use include_time_key to output the message's time
@@ -172,7 +172,7 @@ def test_hash
172
172
d = create_driver ( conf )
173
173
etime = event_time ( "2016-10-07 21:09:31.012345678 UTC" )
174
174
out = capture_log ( d ) { filter ( d , etime , { 'test' => 'test' } ) }
175
- assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>\" test\" }\n " , out
175
+ assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>\" test\" }\n " , out . gsub ( ' => ' , '=>' )
176
176
end
177
177
178
178
def test_hash_nan
@@ -182,7 +182,7 @@ def test_hash_nan
182
182
d = create_driver ( conf )
183
183
etime = event_time ( "2016-10-07 21:09:31.012345678 UTC" )
184
184
out = capture_log ( d ) { filter ( d , etime , { 'test' => Float ::NAN } ) }
185
- assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>NaN}\n " , out
185
+ assert_equal "2016-10-07 21:09:31.012345678 +0000 filter.test: {\" test\" =>NaN}\n " , out . gsub ( ' => ' , '=>' )
186
186
end
187
187
188
188
# Use include_time_key to output the message's time
0 commit comments