| 20 | |
| 21 | #[test] |
| 22 | fn mod_example() { |
| 23 | let runner_env = format!( |
| 24 | "CARGO_TARGET_{}_RUNNER", |
| 25 | CURRENT_TARGET.replace('-', "_").to_uppercase() |
| 26 | ); |
| 27 | if std::env::var(runner_env).is_ok() { |
| 28 | // not running this test on cross because escargot doesn't support the cargo target runner yet |
| 29 | } else { |
| 30 | let bin_under_test = escargot::CargoBuild::new() |
| 31 | .bin("bin_fixture") |
| 32 | .current_release() |
| 33 | .current_target() |
| 34 | .run() |
| 35 | .unwrap(); |
| 36 | let mut cmd = bin_under_test.command(); |
| 37 | let output = cmd.unwrap(); |
| 38 | println!("{output:?}"); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | #[test] |
| 43 | #[should_panic = "`CARGO_BIN_EXE_assert_cmd` is unset |