File tree 2 files changed +26
-25
lines changed
2 files changed +26
-25
lines changed Original file line number Diff line number Diff line change 104
104
#![ warn( clippy:: print_stderr) ]
105
105
#![ warn( clippy:: print_stdout) ]
106
106
107
- /// Allows you to pull the name from your Cargo.toml at compile time.
108
- ///
109
- /// # Examples
110
- ///
111
- /// ```should_panic
112
- /// use assert_cmd::Command;
113
- ///
114
- /// let mut cmd = Command::cargo_bin(assert_cmd::crate_name!()).unwrap();
115
- /// let assert = cmd
116
- /// .arg("-A")
117
- /// .env("stdout", "hello")
118
- /// .env("exit", "42")
119
- /// .write_stdin("42")
120
- /// .assert();
121
- /// assert
122
- /// .failure()
123
- /// .code(42)
124
- /// .stdout("hello\n");
125
- /// ```
126
- #[ macro_export]
127
- macro_rules! crate_name {
128
- ( ) => {
129
- env!( "CARGO_PKG_NAME" )
130
- } ;
131
- }
107
+ mod macros;
132
108
133
109
pub mod assert;
134
110
pub mod cargo;
Original file line number Diff line number Diff line change
1
+ /// Allows you to pull the name from your Cargo.toml at compile time.
2
+ ///
3
+ /// # Examples
4
+ ///
5
+ /// ```should_panic
6
+ /// use assert_cmd::Command;
7
+ ///
8
+ /// let mut cmd = Command::cargo_bin(assert_cmd::crate_name!()).unwrap();
9
+ /// let assert = cmd
10
+ /// .arg("-A")
11
+ /// .env("stdout", "hello")
12
+ /// .env("exit", "42")
13
+ /// .write_stdin("42")
14
+ /// .assert();
15
+ /// assert
16
+ /// .failure()
17
+ /// .code(42)
18
+ /// .stdout("hello\n");
19
+ /// ```
20
+ #[ macro_export]
21
+ macro_rules! crate_name {
22
+ ( ) => {
23
+ env!( "CARGO_PKG_NAME" )
24
+ } ;
25
+ }
You can’t perform that action at this time.
0 commit comments