We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7ddcd2a + 2ec2d7d commit bc6dd90Copy full SHA for bc6dd90
src/librustpkg/tests.rs
@@ -1812,9 +1812,11 @@ fn test_rustpkg_test_output() {
1812
let workspace = create_local_package_with_test(&PkgId::new("foo"));
1813
let output = command_line_test([~"test", ~"foo"], &workspace);
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"));
+ // The first two assertions are separate because test output may
+ // contain color codes, which could appear between "test f" and "ok".
+ 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"));
1820
}
1821
1822
#[test]
0 commit comments