mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Fix some tests
This commit is contained in:
parent
16df1ab41e
commit
662b8553d6
4
Makefile
4
Makefile
@ -7,9 +7,11 @@ ifeq ($(wildcard rustc/bin),)
|
||||
export RUSTC := rustc
|
||||
else
|
||||
export RUSTC := $(CURDIR)/rustc/bin/rustc
|
||||
export LD_LIBRARY_PATH := $(CURDIR)/rustc/lib:$(LD_LIBRARY_PATH)
|
||||
export DYLD_LIBRARY_PATH := $(CURDIR)/rustc/lib:$(DYLD_LIBRARY_PATH)
|
||||
endif
|
||||
|
||||
export PATH := $(PATH):$(CURDIR)/rustc/bin
|
||||
export PATH := $(CURDIR)/rustc/bin:$(PATH)
|
||||
|
||||
# Link flags to pull in dependencies
|
||||
BINS = cargo \
|
||||
|
@ -1062,7 +1062,7 @@ test!(verbose_release_build_deps {
|
||||
--out-dir {dir}{sep}target{sep}release \
|
||||
-L {dir}{sep}target{sep}release \
|
||||
-L {dir}{sep}target{sep}release{sep}deps \
|
||||
--extern foo={dir}/target/release/deps/libfoo{hash1}.rlib`
|
||||
--extern foo={dir}{sep}target{sep}release{sep}deps/libfoo{hash1}.rlib`
|
||||
{compiling} foo v0.0.0 (file:{dir})
|
||||
{compiling} test v0.0.0 (file:{dir})\n",
|
||||
running = RUNNING,
|
||||
|
@ -1,4 +1,7 @@
|
||||
use std::str;
|
||||
|
||||
use support::{project, execs, basic_bin_manifest, COMPILING, cargo_dir};
|
||||
use support::{ResultTest};
|
||||
use hamcrest::{assert_that, existing_file};
|
||||
use cargo::util::process;
|
||||
|
||||
@ -60,23 +63,26 @@ test!(test_with_lib_dep {
|
||||
fn bin_test() {}
|
||||
");
|
||||
|
||||
assert_that(p.cargo_process("cargo-test"),
|
||||
execs().with_status(0)
|
||||
.with_stdout(format!("\
|
||||
{compiling} foo v0.0.1 (file:{dir})
|
||||
let output = p.cargo_process("cargo-test")
|
||||
.exec_with_output().assert();
|
||||
let out = str::from_utf8(output.output.as_slice()).assert();
|
||||
|
||||
let bin = "\
|
||||
running 1 test
|
||||
test bin_test ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
|
||||
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured";
|
||||
let lib = "\
|
||||
running 1 test
|
||||
test lib_test ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured";
|
||||
|
||||
", compiling = COMPILING, dir = p.root().display()).as_slice()));
|
||||
let head = format!("{compiling} foo v0.0.1 (file:{dir})",
|
||||
compiling = COMPILING, dir = p.root().display());
|
||||
|
||||
assert!(out == format!("{}\n\n{}\n\n\n{}\n\n", head, bin, lib).as_slice() ||
|
||||
out == format!("{}\n\n{}\n\n\n{}\n\n", head, lib, bin).as_slice());
|
||||
})
|
||||
|
||||
test!(test_with_deep_lib_dep {
|
||||
|
Loading…
x
Reference in New Issue
Block a user