File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 22//! A fixture without metadata is parsed into a single source file.
33//! Use this to test functionality local to one file.
44//!
5- //! Example:
5+ //! Simple Example:
66//! ```
77//! r#"
88//! fn main() {
1515//! The basic form is specifying filenames,
1616//! which is also how to define multiple files in a single test fixture
1717//!
18- //! Example:
18+ //! Example using two files in the same crate :
1919//! ```
2020//! "
2121//! //- /main.rs
2929//! "
3030//! ```
3131//!
32+ //! Example using two crates with one file each, with one crate depending on the other:
33+ //! ```
34+ //! r#"
35+ //! //- /main.rs crate:a deps:b
36+ //! fn main() {
37+ //! b::foo();
38+ //! }
39+ //! //- /lib.rs crate:b
40+ //! pub fn b() {
41+ //! println!("Hello World")
42+ //! }
43+ //! "#
44+ //! ```
45+ //!
3246//! Metadata allows specifying all settings and variables
3347//! that are available in a real rust project:
3448//! - crate names via `crate:cratename`
3549//! - dependencies via `deps:dep1,dep2`
3650//! - configuration settings via `cfg:dbg=false,opt_level=2`
3751//! - environment variables via `env:PATH=/bin,RUST_LOG=debug`
3852//!
39- //! Example:
53+ //! Example using all available metadata :
4054//! ```
4155//! "
4256//! //- /lib.rs crate:foo deps:bar,baz cfg:foo=a,bar=b env:OUTDIR=path/to,OTHER=foo
You can’t perform that action at this time.
0 commit comments