mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Integration tests working
Next up: cleanup
This commit is contained in:
parent
07af6fdd4a
commit
3b350463af
2
Makefile
2
Makefile
@ -26,7 +26,7 @@ $(HAMMER): $(wildcard libs/hammer.rs/src/*.rs)
|
||||
$(TOML): $(wildcard libs/rust-toml/src/toml/*.rs)
|
||||
cd libs/rust-toml && make
|
||||
|
||||
$(HAMCREST): $(wildcard libs/hamcrest-rust/src/*.rs)
|
||||
$(HAMCREST): $(wildcard libs/hamcrest-rust/src/hamcrest/*.rs)
|
||||
cd libs/hamcrest-rust && make
|
||||
|
||||
# === Cargo
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 95f531ad8c726a832f28d171bde2860c77ec7619
|
||||
Subproject commit 39f00624492fd648631041eadf1301a08cd2a482
|
@ -1,7 +1,31 @@
|
||||
use std;
|
||||
use support::project;
|
||||
use hamcrest::{SelfDescribing,Description,Matcher,assert_that};
|
||||
use cargo;
|
||||
|
||||
#[deriving(Clone,Eq)]
|
||||
pub struct ExistingFile;
|
||||
|
||||
impl SelfDescribing for ExistingFile {
|
||||
fn describe_to(&self, desc: &mut Description) {
|
||||
desc.append_text("an existing file");
|
||||
}
|
||||
}
|
||||
|
||||
impl Matcher<Path> for ExistingFile {
|
||||
fn matches(&self, actual: &Path) -> bool {
|
||||
actual.exists()
|
||||
}
|
||||
|
||||
fn describe_mismatch(&self, actual: &Path, desc: &mut Description) {
|
||||
desc.append_text(format!("`{}` was missing", actual.display()));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn existing_file() -> ExistingFile {
|
||||
ExistingFile
|
||||
}
|
||||
|
||||
fn setup() {
|
||||
|
||||
}
|
||||
@ -39,6 +63,7 @@ test!(cargo_compile_with_explicit_manifest_path {
|
||||
Err(e) => println!("err: {}", e)
|
||||
}
|
||||
|
||||
assert_that(p.root().join("target/foo/bar"), existing_file());
|
||||
assert!(p.root().join("target/foo").exists(), "the executable exists");
|
||||
|
||||
let o = cargo::util::process("foo")
|
||||
|
@ -2,6 +2,7 @@
|
||||
#[allow(deprecated_owned_vector)];
|
||||
|
||||
extern crate cargo;
|
||||
extern crate hamcrest;
|
||||
|
||||
macro_rules! test(
|
||||
($name:ident $expr:expr) => (
|
||||
|
Loading…
x
Reference in New Issue
Block a user