1 unstable release
Uses new Rust 2024
new 0.0.0 | Mar 15, 2025 |
---|
#14 in #doctest
Used in dfir_rs
5KB
include_mdtests::include_mdtests!
This macro allows you to include markdown files with Rust code blocks to be run as tests.
The macro takes one argument, a string path or glob
pattern, relative to the workspace root.
The matched files will be included and converted to doc tests.
Example
include_mdtests::include_mdtests!("my/markdown/test.md")
becomes
#[doc = include_str!("my/markdown/test.md")]
mod my_markdown_test_md {}
lib.rs
:
See include_mdtests!
macro documentation.
Dependencies
~235–670KB
~16K SLoC