Validate output against FileCheck-style directives.
(output: &str, directives: &str)
| 153 | |
| 154 | /// Validate output against FileCheck-style directives. |
| 155 | fn check_output(output: &str, directives: &str) -> Result<()> { |
| 156 | let mut builder = CheckerBuilder::new(); |
| 157 | builder |
| 158 | .text(directives) |
| 159 | .map_err(|e| format_err!("unable to build checker: {e:?}"))?; |
| 160 | let checker = builder.finish(); |
| 161 | let check = checker |
| 162 | .explain(output, NO_VARIABLES) |
| 163 | .map_err(|e| format_err!("{e:?}"))?; |
| 164 | assert!(check.0, "didn't pass check {}", check.1); |
| 165 | Ok(()) |
| 166 | } |
| 167 | |
| 168 | /// Test that breakpoints can be set at the initial stop (before any |
| 169 | /// continue), then hit when the program runs. |
no test coverage detected