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
/// `rustdoc` generated `file`s look like `sync_locked_by_rs`. Underscores (except the last one)/// may represent an actual underscore in a directory/file, or a path separator. Thus the actual/// file might be `sync_locked_by.rs`, `sync/locked_by.rs`, `sync_locked/by.rs` or/// `sync/locked/by.rs`. This function walks the file system to determine which is the real one.////// This does require that ambiguities do not exist, but that seems fair, especially since this is/// all supposed to be temporary until `rustdoc` gives us proper metadata to build this. If such/// ambiguities are detected, they are diagnosed and the script panics.
目前测试信息不含文档测试,运行它们只需要
cargo test --doc
命令,但解析它们需要额外的技巧,或许可以参考我之前写的解析测试输出的正则表达式:https://github.com/josecelano/cargo-pretty-test/blob/23e7a940f1e3c4a778f0ed1aebb67a31b5a85c70/src/regex.rs#L30
轶事 1:Rust For Linux 手动把文档测试抽取成单元测试文件
由于没有直接的方式获取 doc tests 信息,RFL 利用 rustdoc 不稳定的命令行参数手动解析和抽取出文档测试,写入到额外的测试文件。
https://rust-lang.zulipchat.com/#narrow/channel/425075-rust-for-linux/topic/what's.20the.20rustdoc.20hack.3F
轶事 2:文档测试的奇怪运行方式甚至不被 nextest 支持 nextest-rs/nextest#16 。
The text was updated successfully, but these errors were encountered: