Fix parsing of " in RfC output
This commit is contained in:
@ -40,7 +40,8 @@
|
||||
- output_runs.each do |testrun|
|
||||
- output = testrun.try(:output)
|
||||
- if output
|
||||
- messages = output.scan(/{(?:(?:".+?":".+?")+?,?)+}/)
|
||||
// (?:\\"|.) is required to correctly identify " within the output.
|
||||
- messages = output.scan(/{(?:(?:"(?:\\"|.)+?":"(?:\\"|.)+?")+?,?)+}/)
|
||||
- messages.map! {|el| JSON.parse(el)}
|
||||
- messages.keep_if {|message| message['cmd'] == 'write'}
|
||||
- messages.map! {|message| message['data']}
|
||||
|
Reference in New Issue
Block a user