You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, r=alexcrichton
Display correct filename with --test option
Fixes#39592.
With the current files:
```rust
pub mod foo;
/// This is a Foo;
///
/// ```
/// println!("baaaaaar");
/// ```
pub struct Foo;
/// This is a Bar;
///
/// ```
/// println!("fooooo");
/// ```
pub struct Bar;
```
```rust
// note the whitespaces
/// ```
/// println!("foo");
/// ```
pub fn foo() {}
```
It displays:
```
./build/x86_64-apple-darwin/stage1/bin/rustdoc --test test.rs
running 3 tests
test test.rs - line 13 ... ok
test test.rs - line 5 ... ok
test foo.rs - line 2 ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured
```
```
` ``
println!("lol");
` ``
asdjnfasd
asd
```
It displays:
```
./build/x86_64-apple-darwin/stage1/bin/rustdoc --test foo.md
running 1 test
test <input> - line 3 ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
```
r? @alexcrichton
0 commit comments