This repository was archived by the owner on Dec 29, 2021. It is now read-only.
File tree 2 files changed +15
-6
lines changed
2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ dev = ["clippy"]
16
16
[dependencies ]
17
17
ansi_term = " 0.6.3"
18
18
difference = " 0.4.0"
19
- clippy = {version = " 0.0.21 " , optional = true }
19
+ clippy = {version = " 0.0.23 " , optional = true }
Original file line number Diff line number Diff line change 28
28
//!
29
29
//! Alternatively, you can use the `assert_cli!` macro:
30
30
//!
31
- //! ```rust,ignore
32
- //! assert_cli!("echo 42" => Success, "42").unwrap();
31
+ //! ```rust
32
+ //! # #[macro_use] extern crate assert_cli;
33
+ //! # fn main() {
34
+ //! assert_cli!("echo", &["42"] => Success, "42").unwrap();
35
+ //! # }
33
36
//! ```
34
37
//!
35
38
//! Make sure to include the crate as `#[macro_use] extern crate assert_cli;`.
@@ -161,9 +164,15 @@ pub fn assert_cli_output_error<S>(cmd: &str,
161
164
/// The `assert_cli!` macro combines the functionality of the other functions in this crate in one
162
165
/// short macro.
163
166
///
164
- /// ```rust,ignore
165
- /// assert_cli!("echo 42" => Success, "42").unwrap();
166
- /// assert_cli!("exit 11" => Error 11, "").unwrap();
167
+ /// ```rust
168
+ /// #[macro_use] extern crate assert_cli;
169
+ /// # const BLACK_BOX: &'static str = r#"function test_helper() {\
170
+ /// # >&2 echo "error no 66!"; return 66; }; test_helper"#;
171
+ ///
172
+ /// fn main() {
173
+ /// assert_cli!("echo", &["42"] => Success, "42").unwrap();
174
+ /// assert_cli!("bash", &["-c", BLACK_BOX] => Error 66, "error no 66!").unwrap();
175
+ /// }
167
176
/// ```
168
177
///
169
178
/// Make sure to include the crate as `#[macro_use] extern crate assert_cli;`.
You can’t perform that action at this time.
0 commit comments