MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / mod_example

Function mod_example

tests/cargo.rs:22–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21#[test]
22fn 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

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected