Fixed relaxed libtest tests
authorGilad Naaman <gilad.naaman@gmail.com>
Fri, 26 Jan 2018 16:23:44 +0000 (18:23 +0200)
committerGilad Naaman <gilad.naaman@gmail.com>
Fri, 26 Jan 2018 16:23:44 +0000 (18:23 +0200)
tests/bench.rs

index da29bc364b7de203e2b146049085a2270cbbb825..947f920e32c930e3a3e95829613976749a53f98e 100644 (file)
@@ -288,13 +288,12 @@ fn cargo_bench_failing_test() {
 
     // Force libtest into serial execution so that the test header will be printed.
     assert_that(p.cargo("bench").arg("--").arg("--test-threads=1"),
-                execs().with_stdout_contains("test bench_hello ... ")
-                       .with_either_contains(format!("\
-[COMPILING] foo v0.5.0 ({})
+                execs().with_stdout_contains("test bench_hello ...[..]")
+                       .with_stderr_contains(format!("\
+[COMPILING] foo v0.5.0 ({})[..]
 [FINISHED] release [optimized] target(s) in [..]
-[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]
-thread '[..]' panicked at 'assertion failed: \
-    `(left == right)`[..]", p.url()))
+[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", p.url()))
+                       .with_either_contains("[..]thread '[..]' panicked at 'assertion failed: `(left == right)`[..]")
                        .with_either_contains("[..]left: `\"hello\"`[..]")
                        .with_either_contains("[..]right: `\"nope\"`[..]")
                        .with_either_contains("[..]src[/]main.rs:15[..]")