Expand fixture documentation a little

This commit is contained in:
Timo Freiberg 2020-05-10 15:56:51 +02:00
parent 66db88d226
commit e17193dc51

View file

@ -2,7 +2,7 @@
//! A fixture without metadata is parsed into a single source file.
//! Use this to test functionality local to one file.
//!
//! Example:
//! Simple Example:
//! ```
//! r#"
//! fn main() {
@ -15,7 +15,7 @@
//! The basic form is specifying filenames,
//! which is also how to define multiple files in a single test fixture
//!
//! Example:
//! Example using two files in the same crate:
//! ```
//! "
//! //- /main.rs
@ -29,6 +29,20 @@
//! "
//! ```
//!
//! Example using two crates with one file each, with one crate depending on the other:
//! ```
//! r#"
//! //- /main.rs crate:a deps:b
//! fn main() {
//! b::foo();
//! }
//! //- /lib.rs crate:b
//! pub fn b() {
//! println!("Hello World")
//! }
//! "#
//! ```
//!
//! Metadata allows specifying all settings and variables
//! that are available in a real rust project:
//! - crate names via `crate:cratename`
@ -36,7 +50,7 @@
//! - configuration settings via `cfg:dbg=false,opt_level=2`
//! - environment variables via `env:PATH=/bin,RUST_LOG=debug`
//!
//! Example:
//! Example using all available metadata:
//! ```
//! "
//! //- /lib.rs crate:foo deps:bar,baz cfg:foo=a,bar=b env:OUTDIR=path/to,OTHER=foo