Skip to content

Commit 847585b

Browse files
committed
[nextest-runner] fix tests
1 parent bbe8359 commit 847585b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

nextest-runner/src/reporter/aggregator.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,22 @@ thread 'test_result_failure' panicked at 'assertion failed: `(left == right)`
405405
right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/test/src/lib.rs:186:5
406406
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace"#,
407407
),
408-
(
409-
"foobar\nError: \"this is an error\"\n",
410-
"Error: \"this is an error\"\n",
411-
),
412408
];
413409

414410
for (input, output) in tests {
415411
assert_eq!(heuristic_stack_trace(input).as_deref(), Some(*output));
416412
}
417413
}
414+
415+
#[test]
416+
fn test_heuristic_error_str() {
417+
let tests: &[(&str, &str)] = &[(
418+
"foobar\nError: \"this is an error\"\n",
419+
"Error: \"this is an error\"",
420+
)];
421+
422+
for (input, output) in tests {
423+
assert_eq!(heuristic_error_str(input).as_deref(), Some(*output));
424+
}
425+
}
418426
}

0 commit comments

Comments
 (0)