()
| 986 | |
| 987 | #[test] |
| 988 | fn broken_output_stream_is_ignored() { |
| 989 | struct BrokenWriter; |
| 990 | |
| 991 | impl std::io::Write for BrokenWriter { |
| 992 | fn write(&mut self, _buf: &[u8]) -> std::io::Result<usize> { |
| 993 | Err(std::io::Error::new( |
| 994 | std::io::ErrorKind::BrokenPipe, |
| 995 | "reader closed", |
| 996 | )) |
| 997 | } |
| 998 | |
| 999 | fn flush(&mut self) -> std::io::Result<()> { |
| 1000 | Ok(()) |
| 1001 | } |
| 1002 | } |
| 1003 | |
| 1004 | write_ignoring_errors(BrokenWriter, "error: unknown-arg\n"); |
| 1005 | } |
| 1006 | |
| 1007 | #[test] |
| 1008 | fn default_ignorable_unicode_is_escaped() { |
nothing calls this directly
no test coverage detected