rust-lang / libtest

Rust's built-in testing and benchmarking framework
Apache License 2.0
60 stars 21 forks source link

Escape test names in events emitted by the JSON formatter #10

Closed garyttierney closed 5 years ago

garyttierney commented 5 years ago

Converts test names to escaped strings before formatting the message to be emitted. This prevents invalid JSON being generated when the test name contains text that needs escaped (e.g.: the backslash in a Windows path from a doctest).

garyttierney commented 5 years ago

Oops, please ignore this! I've pushed a stale working tree. I'll push a working fix in a moment.