File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1812,9 +1812,11 @@ fn test_rustpkg_test_output() {
1812
1812
let workspace = create_local_package_with_test(&PkgId::new(" foo"));
1813
1813
let output = command_line_test([~" test", ~" foo"], &workspace);
1814
1814
let output_str = str::from_utf8(output.output);
1815
- assert!(output_str.contains(" test f ... ok"));
1816
- assert!(output_str.contains(
1817
- " test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured"));
1815
+ // The first two assertions are separate because test output may
1816
+ // contain color codes, which could appear between " test f" and " ok".
1817
+ assert!(output_str.contains(" test f"));
1818
+ assert!(output_str.contains(" ok"));
1819
+ assert!(output_str.contains(" 1 passed; 0 failed; 0 ignored; 0 measured"));
1818
1820
}
1819
1821
1820
1822
#[test]
You can’t perform that action at this time.
0 commit comments