mirror of
https://github.com/rust-lang/cargo
synced 2024-11-05 18:50:39 +00:00
ef28cd2d97
These were previously just run by executing the raw binary, but this didn't ensure that any of the necessary paths were in the dylib search path for the host platform. This commit enhances the return type of `compile_targets` to have information about the result of compilation, along with the ability to spawn correctly configured processes. This primarily fixes `cargo test` and `cargo run` whenever dynamic dependencies are involved, but it also fixes the two commands whenever there's a native dynamic dependency involved as well.
13 lines
289 B
Rust
13 lines
289 B
Rust
use support::{project, execs};
|
|
use hamcrest::assert_that;
|
|
use cargo;
|
|
|
|
fn setup() {}
|
|
|
|
test!(simple {
|
|
let p = project("foo");
|
|
|
|
assert_that(p.cargo_process("cargo-version"),
|
|
execs().with_status(0).with_stdout(format!("{}\n",
|
|
cargo::version()).as_slice()));
|
|
})
|