File tree Expand file tree Collapse file tree 2 files changed +117
-110
lines changed
crates/cargo-test-support/src Expand file tree Collapse file tree 2 files changed +117
-110
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ pub mod registry;
60
60
pub mod tools;
61
61
62
62
pub mod prelude {
63
+ pub use crate :: CargoCommand ;
63
64
pub use crate :: ChannelChanger ;
64
65
pub use crate :: TestEnv ;
65
66
}
@@ -1229,6 +1230,19 @@ impl TestEnv for snapbox::cmd::Command {
1229
1230
}
1230
1231
}
1231
1232
1233
+ /// Test the cargo command
1234
+ pub trait CargoCommand {
1235
+ fn cargo ( ) -> Self ;
1236
+ }
1237
+
1238
+ impl CargoCommand for snapbox:: cmd:: Command {
1239
+ fn cargo ( ) -> Self {
1240
+ Self :: new ( cargo_exe ( ) )
1241
+ . with_assert ( compare:: assert ( ) )
1242
+ . test_env ( )
1243
+ }
1244
+ }
1245
+
1232
1246
fn split_and_add_args ( p : & mut ProcessBuilder , s : & str ) {
1233
1247
for mut arg in s. split_whitespace ( ) {
1234
1248
if ( arg. starts_with ( '"' ) && arg. ends_with ( '"' ) )
You can’t perform that action at this time.
0 commit comments