summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-02-11 16:36:31 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-02-11 16:36:31 +0100
commitc951ed7fb6daa7dff6dfb3e648576488f74ccaee (patch)
tree57d607fe9f3d7eaea3e875ef23da177111dae11d /src/tools
parentbae454edc5e18e81b831baf4a7647bf2dda620a8 (diff)
downloadrust-c951ed7fb6daa7dff6dfb3e648576488f74ccaee.tar.gz
rust-c951ed7fb6daa7dff6dfb3e648576488f74ccaee.zip
Add tested item in the rustdoc --test output
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/compiletest/src/runtest.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 1a3d7a190be..d0aba8a0b0a 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1998,16 +1998,20 @@ actual:\n\
         for _ in res.stdout.split("\n")
                            .filter(|s| s.starts_with("test "))
                            .inspect(|s| {
-                               let tmp: Vec<&str> = s.split(" - line ").collect();
+                               let tmp: Vec<&str> = s.split(" - ").collect();
                                if tmp.len() == 2 {
                                    let path = tmp[0].rsplit("test ").next().unwrap();
                                    if let Some(ref mut v) = files.get_mut(path) {
                                        tested += 1;
-                                       let line = tmp[1].split(" ...")
-                                                        .next()
-                                                        .unwrap_or("0")
-                                                        .parse()
-                                                        .unwrap_or(0);
+                                       let mut iter = tmp[1].split("(line ");
+                                       iter.next();
+                                       let line = iter.next()
+                                                      .unwrap_or(")")
+                                                      .split(")")
+                                                      .next()
+                                                      .unwrap_or("0")
+                                                      .parse()
+                                                      .unwrap_or(0);
                                        if let Ok(pos) = v.binary_search(&line) {
                                            v.remove(pos);
                                        } else {