File tree 1 file changed +17
-3
lines changed 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 2
2
//! A fixture without metadata is parsed into a single source file.
3
3
//! Use this to test functionality local to one file.
4
4
//!
5
- //! Example:
5
+ //! Simple Example:
6
6
//! ```
7
7
//! r#"
8
8
//! fn main() {
15
15
//! The basic form is specifying filenames,
16
16
//! which is also how to define multiple files in a single test fixture
17
17
//!
18
- //! Example:
18
+ //! Example using two files in the same crate :
19
19
//! ```
20
20
//! "
21
21
//! //- /main.rs
29
29
//! "
30
30
//! ```
31
31
//!
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
+ //!
32
46
//! Metadata allows specifying all settings and variables
33
47
//! that are available in a real rust project:
34
48
//! - crate names via `crate:cratename`
35
49
//! - dependencies via `deps:dep1,dep2`
36
50
//! - configuration settings via `cfg:dbg=false,opt_level=2`
37
51
//! - environment variables via `env:PATH=/bin,RUST_LOG=debug`
38
52
//!
39
- //! Example:
53
+ //! Example using all available metadata :
40
54
//! ```
41
55
//! "
42
56
//! //- /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