From 1a2257bfb67263bf46dd1405aac7a416d542662c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 15 May 2016 00:15:22 +0300 Subject: [PATCH] fix a bunch of tests with regexp --- tests/test_cargo_bench.rs | 2 +- tests/test_cargo_cfg.rs | 4 +-- tests/test_cargo_compile_custom_build.rs | 36 ++++++++++++------------ tests/test_cargo_compile_git_deps.rs | 8 +++--- tests/test_cargo_compile_path_deps.rs | 6 ++-- tests/test_cargo_compile_plugins.rs | 2 +- tests/test_cargo_concurrent.rs | 4 +-- tests/test_cargo_cross_compile.rs | 2 +- tests/test_cargo_doc.rs | 4 +-- tests/test_cargo_features.rs | 4 +-- tests/test_cargo_freshness.rs | 8 +++--- tests/test_cargo_install.rs | 6 ++-- tests/test_cargo_overrides.rs | 16 +++++------ tests/test_cargo_package.rs | 10 +++---- tests/test_cargo_registry.rs | 24 ++++++++-------- tests/test_cargo_rustc.rs | 2 +- tests/test_cargo_test.rs | 6 ++-- 17 files changed, 72 insertions(+), 72 deletions(-) diff --git a/tests/test_cargo_bench.rs b/tests/test_cargo_bench.rs index b75207a4c..fcff692e2 100644 --- a/tests/test_cargo_bench.rs +++ b/tests/test_cargo_bench.rs @@ -929,7 +929,7 @@ test!(test_bench_no_run { assert_that(p.cargo_process("bench").arg("--no-run"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] foo v0.1.0 ([..]) ")); }); diff --git a/tests/test_cargo_cfg.rs b/tests/test_cargo_cfg.rs index 490a4c564..3d45b7fea 100644 --- a/tests/test_cargo_cfg.rs +++ b/tests/test_cargo_cfg.rs @@ -184,7 +184,7 @@ test!(dont_include { "#) .file("b/src/lib.rs", ""); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] a v0.0.1 ([..]) ")); }); @@ -211,7 +211,7 @@ test!(works_through_the_registry { .file("src/lib.rs", "extern crate bar;"); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry [..] [DOWNLOADING] [..] [DOWNLOADING] [..] diff --git a/tests/test_cargo_compile_custom_build.rs b/tests/test_cargo_compile_custom_build.rs index 6a4d3679e..4102e1d44 100644 --- a/tests/test_cargo_compile_custom_build.rs +++ b/tests/test_cargo_compile_custom_build.rs @@ -289,7 +289,7 @@ test!(overrides_and_links { assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [..] [..] [..] @@ -386,7 +386,7 @@ test!(only_rerun_build_script { assert_that(p.cargo("build").arg("-v"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `[..]build-script-build[..]` [RUNNING] `rustc [..] --crate-name foo [..]` @@ -494,7 +494,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured println!("doc"); assert_that(p.cargo("doc").arg("-v"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [DOCUMENTING] foo v0.5.0 (file://[..]) [RUNNING] `rustdoc [..]` ")); @@ -504,7 +504,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured println!("run"); assert_that(p.cargo("run"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `target[..]foo[..]` ")); @@ -642,7 +642,7 @@ test!(build_deps_simple { assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] a v0.5.0 (file://[..]) [RUNNING] `rustc [..] --crate-name a [..]` [COMPILING] foo v0.5.0 (file://[..]) @@ -819,7 +819,7 @@ test!(output_separate_lines { "#); assert_that(p.cargo_process("build").arg("-v"), execs().with_status(101) - .with_stdout("\ + .with_stderr("\ [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `rustc build.rs [..]` [RUNNING] `[..]foo-[..]build-script-build[..]` @@ -845,7 +845,7 @@ test!(output_separate_lines_new { "#); assert_that(p.cargo_process("build").arg("-v"), execs().with_status(101) - .with_stdout("\ + .with_stderr("\ [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `rustc build.rs [..]` [RUNNING] `[..]foo-[..]build-script-build[..]` @@ -1617,7 +1617,7 @@ test!(diamond_passes_args_only_once { .file("c/src/lib.rs", ""); assert_that(p.cargo_process("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] c v0.5.0 ([..] [RUNNING] `rustc [..]` [RUNNING] `[..]` @@ -1651,7 +1651,7 @@ test!(adding_an_override_invalidates { "#); assert_that(p.cargo_process("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] foo v0.5.0 ([..] [RUNNING] `rustc [..]` [RUNNING] `[..]` @@ -1664,7 +1664,7 @@ test!(adding_an_override_invalidates { ", target).as_bytes()).unwrap(); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] foo v0.5.0 ([..] [RUNNING] `rustc [..] -L native=bar` ")); @@ -1689,7 +1689,7 @@ test!(changing_an_override_invalidates { .file("build.rs", ""); assert_that(p.cargo_process("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] foo v0.5.0 ([..] [RUNNING] `rustc [..] -L native=foo` ")); @@ -1700,7 +1700,7 @@ test!(changing_an_override_invalidates { ", target).as_bytes()).unwrap(); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] foo v0.5.0 ([..] [RUNNING] `rustc [..] -L native=bar` ")); @@ -1730,7 +1730,7 @@ test!(rebuild_only_on_explicit_paths { // files don't exist, so should always rerun if they don't exist println!("run without"); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] a v0.5.0 ([..]) [RUNNING] `[..]build-script-build[..]` [RUNNING] `rustc src[..]lib.rs [..]` @@ -1743,7 +1743,7 @@ test!(rebuild_only_on_explicit_paths { // now the exist, so run once, catch the mtime, then shouldn't run again println!("run with"); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] a v0.5.0 ([..]) [RUNNING] `[..]build-script-build[..]` [RUNNING] `rustc src[..]lib.rs [..]` @@ -1751,7 +1751,7 @@ test!(rebuild_only_on_explicit_paths { println!("run with2"); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [FRESH] a v0.5.0 ([..]) ")); @@ -1761,7 +1761,7 @@ test!(rebuild_only_on_explicit_paths { println!("run baz"); File::create(p.root().join("baz")).unwrap(); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [FRESH] a v0.5.0 ([..]) ")); @@ -1769,7 +1769,7 @@ test!(rebuild_only_on_explicit_paths { println!("run foo change"); File::create(p.root().join("foo")).unwrap(); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] a v0.5.0 ([..]) [RUNNING] `[..]build-script-build[..]` [RUNNING] `rustc src[..]lib.rs [..]` @@ -1779,7 +1779,7 @@ test!(rebuild_only_on_explicit_paths { println!("run foo delete"); fs::remove_file(p.root().join("bar")).unwrap(); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] a v0.5.0 ([..]) [RUNNING] `[..]build-script-build[..]` [RUNNING] `rustc src[..]lib.rs [..]` diff --git a/tests/test_cargo_compile_git_deps.rs b/tests/test_cargo_compile_git_deps.rs index 28e7ffd75..b6080442e 100644 --- a/tests/test_cargo_compile_git_deps.rs +++ b/tests/test_cargo_compile_git_deps.rs @@ -1553,7 +1553,7 @@ test!(switch_sources { p.build(); assert_that(p.cargo("build"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [UPDATING] git repository `file://[..]a1` [COMPILING] a v0.5.0 ([..]a1#[..] [COMPILING] b v0.5.0 ([..]) @@ -1571,7 +1571,7 @@ test!(switch_sources { assert_that(p.cargo("build"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [UPDATING] git repository `file://[..]a2` [COMPILING] a v0.5.1 ([..]a2#[..] [COMPILING] b v0.5.0 ([..]) @@ -1677,7 +1677,7 @@ test!(lints_are_suppressed { .file("src/lib.rs", ""); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] git repository `[..]` [COMPILING] a v0.5.0 ([..]) [COMPILING] foo v0.0.1 ([..]) @@ -1714,7 +1714,7 @@ test!(denied_lints_are_allowed { .file("src/lib.rs", ""); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] git repository `[..]` [COMPILING] a v0.5.0 ([..]) [COMPILING] foo v0.0.1 ([..]) diff --git a/tests/test_cargo_compile_path_deps.rs b/tests/test_cargo_compile_path_deps.rs index 4ac9e2a15..5589f0ef7 100644 --- a/tests/test_cargo_compile_path_deps.rs +++ b/tests/test_cargo_compile_path_deps.rs @@ -783,7 +783,7 @@ test!(custom_target_no_rebuild { p.build(); assert_that(p.cargo("build"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] a v0.5.0 ([..]) [COMPILING] foo v0.5.0 ([..]) ")); @@ -792,7 +792,7 @@ test!(custom_target_no_rebuild { .arg("--manifest-path=b/Cargo.toml") .env("CARGO_TARGET_DIR", "target"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] b v0.5.0 ([..]) ")); }); @@ -831,7 +831,7 @@ test!(override_and_depend { p.build(); assert_that(p.cargo("build").cwd(p.root().join("b")), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] a2 v0.5.0 ([..]) [COMPILING] a1 v0.5.0 ([..]) [COMPILING] b v0.5.0 ([..]) diff --git a/tests/test_cargo_compile_plugins.rs b/tests/test_cargo_compile_plugins.rs index 3d4541fa4..655de4d16 100644 --- a/tests/test_cargo_compile_plugins.rs +++ b/tests/test_cargo_compile_plugins.rs @@ -262,7 +262,7 @@ test!(native_plugin_dependency_with_custom_ar_linker { foo.build(); assert_that(bar.cargo_process("build").arg("--verbose"), - execs().with_stdout("\ + execs().with_stderr("\ [COMPILING] foo v0.0.1 ([..]) [RUNNING] `rustc [..] -C ar=nonexistent-ar -C linker=nonexistent-linker [..]` ")); diff --git a/tests/test_cargo_concurrent.rs b/tests/test_cargo_concurrent.rs index eb778f41c..8c73bdbcd 100644 --- a/tests/test_cargo_concurrent.rs +++ b/tests/test_cargo_concurrent.rs @@ -409,10 +409,10 @@ test!(debug_release_ok { let b = b.wait_with_output().unwrap(); let a = a.join().unwrap(); - assert_that(a, execs().with_status(0).with_stdout("\ + assert_that(a, execs().with_status(0).with_stderr("\ [COMPILING] foo v0.0.0 [..] ")); - assert_that(b, execs().with_status(0).with_stdout("\ + assert_that(b, execs().with_status(0).with_stderr("\ [COMPILING] foo v0.0.0 [..] ")); }); diff --git a/tests/test_cargo_cross_compile.rs b/tests/test_cargo_cross_compile.rs index 643431ef8..1a9f4c585 100644 --- a/tests/test_cargo_cross_compile.rs +++ b/tests/test_cargo_cross_compile.rs @@ -789,7 +789,7 @@ test!(plugin_build_script_right_arch { assert_that(p.cargo_process("build").arg("-v").arg("--target").arg(alternate()), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] foo v0.0.1 ([..]) [RUNNING] `rustc build.rs [..]` [RUNNING] `[..]build-script-build[..]` diff --git a/tests/test_cargo_doc.rs b/tests/test_cargo_doc.rs index dc1b32b60..647c8b1d6 100644 --- a/tests/test_cargo_doc.rs +++ b/tests/test_cargo_doc.rs @@ -240,7 +240,7 @@ test!(doc_dash_p { assert_that(p.cargo_process("doc").arg("-p").arg("a"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [..] b v0.0.1 (file://[..]) [..] b v0.0.1 (file://[..]) [DOCUMENTING] a v0.0.1 (file://[..]) @@ -426,7 +426,7 @@ test!(doc_release { execs().with_status(0)); assert_that(p.cargo("doc").arg("--release").arg("-v"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [DOCUMENTING] foo v0.0.1 ([..]) [RUNNING] `rustdoc src[..]lib.rs [..]` ")); diff --git a/tests/test_cargo_features.rs b/tests/test_cargo_features.rs index b3c73db7a..6b0335c4c 100644 --- a/tests/test_cargo_features.rs +++ b/tests/test_cargo_features.rs @@ -538,7 +538,7 @@ test!(many_features_no_rebuilds { p.root().move_into_the_past().unwrap(); assert_that(p.cargo("build").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [FRESH] a v0.1.0 ([..]/a) [FRESH] b v0.1.0 ([..]) ")); @@ -764,7 +764,7 @@ test!(optional_and_dev_dep { .file("foo/src/lib.rs", ""); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] test v0.1.0 ([..]) ")); }); diff --git a/tests/test_cargo_freshness.rs b/tests/test_cargo_freshness.rs index 627225479..6655824d7 100644 --- a/tests/test_cargo_freshness.rs +++ b/tests/test_cargo_freshness.rs @@ -151,19 +151,19 @@ test!(changing_features_is_ok { assert_that(p.cargo_process("build"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [..]Compiling foo v0.0.1 ([..]) ")); assert_that(p.cargo("build").arg("--features").arg("foo"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [..]Compiling foo v0.0.1 ([..]) ")); assert_that(p.cargo("build"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [..]Compiling foo v0.0.1 ([..]) ")); @@ -249,7 +249,7 @@ test!(no_rebuild_transitive_target_deps { execs().with_status(0)); assert_that(p.cargo("test").arg("--no-run"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] c v0.0.1 ([..]) [COMPILING] b v0.0.1 ([..]) [COMPILING] foo v0.0.1 ([..]) diff --git a/tests/test_cargo_install.rs b/tests/test_cargo_install.rs index 85c0515ba..ba8b8a613 100644 --- a/tests/test_cargo_install.rs +++ b/tests/test_cargo_install.rs @@ -619,7 +619,7 @@ test!(uninstall_piecemeal { assert_that(cargo_home(), has_installed_exe("bar")); assert_that(cargo_process("uninstall").arg("foo").arg("--bin=bar"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [REMOVING] [..]bar[..] ")); @@ -627,7 +627,7 @@ test!(uninstall_piecemeal { assert_that(cargo_home(), is_not(has_installed_exe("bar"))); assert_that(cargo_process("uninstall").arg("foo").arg("--bin=foo"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [REMOVING] [..]foo[..] ")); assert_that(cargo_home(), is_not(has_installed_exe("foo"))); @@ -683,7 +683,7 @@ test!(do_not_rebuilds_on_local_install { assert_that(p.cargo_process("build").arg("--release"), execs().with_status(0)); assert_that(cargo_process("install").arg("--path").arg(p.root()), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [INSTALLING] [..] ").with_stderr("\ warning: be sure to add `[..]` to your PATH to be able to run the installed binaries diff --git a/tests/test_cargo_overrides.rs b/tests/test_cargo_overrides.rs index 216c39643..8d03715cb 100644 --- a/tests/test_cargo_overrides.rs +++ b/tests/test_cargo_overrides.rs @@ -41,7 +41,7 @@ test!(override_simple { "); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `file://[..]` [UPDATING] git repository `[..]` [COMPILING] foo v0.1.0 (file://[..]) @@ -135,7 +135,7 @@ test!(transitive { .file("src/lib.rs", ""); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `file://[..]` [UPDATING] git repository `[..]` [DOWNLOADING] bar v0.2.0 (registry [..]) @@ -181,7 +181,7 @@ test!(persists_across_rebuilds { "); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `file://[..]` [UPDATING] git repository `file://[..]` [COMPILING] foo v0.1.0 (file://[..]) @@ -226,7 +226,7 @@ test!(replace_registry_with_path { "); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `file://[..]` [COMPILING] foo v0.1.0 (file://[..]) [COMPILING] local v0.0.1 (file://[..]) @@ -281,7 +281,7 @@ test!(use_a_spec_to_select { "); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `file://[..]` [UPDATING] git repository `[..]` [DOWNLOADING] [..] @@ -326,7 +326,7 @@ test!(override_adds_some_deps { .file("src/lib.rs", ""); assert_that(p.cargo_process("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `file://[..]` [UPDATING] git repository `[..]` [DOWNLOADING] foo v0.1.1 (registry [..]) @@ -339,11 +339,11 @@ test!(override_adds_some_deps { Package::new("foo", "0.1.2").publish(); assert_that(p.cargo("update").arg("-p").arg(&format!("{}#bar", foo.url())), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] git repository `file://[..]` ")); assert_that(p.cargo("update").arg("-p").arg(&format!("{}#bar", registry())), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `file://[..]` ")); diff --git a/tests/test_cargo_package.rs b/tests/test_cargo_package.rs index 6cd97c1ef..5ed7b62c6 100644 --- a/tests/test_cargo_package.rs +++ b/tests/test_cargo_package.rs @@ -152,7 +152,7 @@ test!(package_verbose { println!("package main repo"); assert_that(cargo.clone().arg("package").arg("-v").arg("--no-verify"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [PACKAGING] foo v0.0.1 ([..]) [ARCHIVING] [..] [ARCHIVING] [..] @@ -161,7 +161,7 @@ test!(package_verbose { println!("package sub-repo"); assert_that(cargo.arg("package").arg("-v").arg("--no-verify") .cwd(p.root().join("a")), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [PACKAGING] a v0.0.1 ([..]) [ARCHIVING] [..] [ARCHIVING] [..] @@ -206,7 +206,7 @@ test!(exclude { .file("src/bar.txt", ""); assert_that(p.cargo_process("package").arg("--no-verify").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [PACKAGING] foo v0.0.1 ([..]) [ARCHIVING] [..] [ARCHIVING] [..] @@ -230,7 +230,7 @@ test!(include { .file("src/bar.txt", ""); // should be ignored when packaging assert_that(p.cargo_process("package").arg("--no-verify").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [PACKAGING] foo v0.0.1 ([..]) [ARCHIVING] [..] [ARCHIVING] [..] @@ -269,7 +269,7 @@ test!(package_new_git_repo { assert_that(::cargo_process().arg("package").cwd(p.root()) .arg("--no-verify").arg("-v"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [PACKAGING] foo v0.0.1 ([..]) [ARCHIVING] [..] [ARCHIVING] [..] diff --git a/tests/test_cargo_registry.rs b/tests/test_cargo_registry.rs index e438b5d27..ab103a6c9 100644 --- a/tests/test_cargo_registry.rs +++ b/tests/test_cargo_registry.rs @@ -430,7 +430,7 @@ test!(update_with_lockfile_if_packages_missing { paths::home().join(".cargo/registry").rm_rf().unwrap(); assert_that(p.cargo("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `[..]` [DOWNLOADING] bar v0.0.1 (registry file://[..]) ")); @@ -461,7 +461,7 @@ test!(update_lockfile { println!("0.0.2 update"); assert_that(p.cargo("update") .arg("-p").arg("bar").arg("--precise").arg("0.0.2"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `[..]` [UPDATING] bar v0.0.1 (registry file://[..]) -> v0.0.2 ")); @@ -478,7 +478,7 @@ test!(update_lockfile { println!("0.0.3 update"); assert_that(p.cargo("update") .arg("-p").arg("bar"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `[..]` [UPDATING] bar v0.0.2 (registry file://[..]) -> v0.0.3 ")); @@ -497,7 +497,7 @@ test!(update_lockfile { Package::new("spam", "0.2.5").publish(); assert_that(p.cargo("update") .arg("-p").arg("bar"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `[..]` [UPDATING] bar v0.0.3 (registry file://[..]) -> v0.0.4 [ADDING] spam v0.2.5 (registry file://[..]) @@ -507,7 +507,7 @@ test!(update_lockfile { Package::new("bar", "0.0.5").publish(); assert_that(p.cargo("update") .arg("-p").arg("bar"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `[..]` [UPDATING] bar v0.0.4 (registry file://[..]) -> v0.0.5 [REMOVING] spam v0.2.5 (registry file://[..]) @@ -735,7 +735,7 @@ test!(fetch_downloads { assert_that(p.cargo("fetch"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [UPDATING] registry `[..]` [DOWNLOADING] a v0.1.0 (registry [..]) ")); @@ -765,14 +765,14 @@ test!(update_transitive_dependency { assert_that(p.cargo("update").arg("-pb"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [UPDATING] registry `[..]` [UPDATING] b v0.1.0 (registry [..]) -> v0.1.1 ")); assert_that(p.cargo("build"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [DOWNLOADING] b v0.1.1 (registry file://[..]) [COMPILING] b v0.1.1 (registry [..]) [COMPILING] a v0.1.0 (registry [..]) @@ -811,7 +811,7 @@ test!(update_backtracking_ok { assert_that(p.cargo("update").arg("-p").arg("hyper"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [UPDATING] registry `[..]` ")); }); @@ -845,7 +845,7 @@ test!(update_multiple_packages { assert_that(p.cargo("update").arg("-pa").arg("-pb"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [UPDATING] registry `[..]` [UPDATING] a v0.1.0 (registry [..]) -> v0.1.1 [UPDATING] b v0.1.0 (registry [..]) -> v0.1.1 @@ -853,7 +853,7 @@ test!(update_multiple_packages { assert_that(p.cargo("update").arg("-pb").arg("-pc"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [UPDATING] registry `[..]` [UPDATING] c v0.1.0 (registry [..]) -> v0.1.1 ")); @@ -982,7 +982,7 @@ test!(only_download_relevant { Package::new("baz", "0.1.0").publish(); assert_that(p.cargo("build"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [UPDATING] registry `[..]` [DOWNLOADING] baz v0.1.0 ([..]) [COMPILING] baz v0.1.0 ([..]) diff --git a/tests/test_cargo_rustc.rs b/tests/test_cargo_rustc.rs index 942c99aa3..ab72e819b 100644 --- a/tests/test_cargo_rustc.rs +++ b/tests/test_cargo_rustc.rs @@ -283,7 +283,7 @@ test!(build_only_bar_dependency { .arg("--").arg("-Z").arg("unstable-options"), execs() .with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] bar v0.1.0 ([..]) [RUNNING] `[..]--crate-name bar --crate-type lib [..] -Z unstable-options [..]` ")); diff --git a/tests/test_cargo_test.rs b/tests/test_cargo_test.rs index cf6f50e8d..9706d169a 100644 --- a/tests/test_cargo_test.rs +++ b/tests/test_cargo_test.rs @@ -1528,7 +1528,7 @@ test!(example_with_dev_dep { assert_that(p.cargo_process("test").arg("-v"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [..] [..] [..] @@ -1981,7 +1981,7 @@ test!(bin_does_not_rebuild_tests { assert_that(p.cargo("test").arg("-v").arg("--no-run"), execs().with_status(0) - .with_stdout("\ + .with_stderr("\ [COMPILING] foo v0.0.1 ([..]) [RUNNING] `rustc src[..]main.rs [..]` [RUNNING] `rustc src[..]main.rs [..]` @@ -2040,7 +2040,7 @@ test!(selective_test_optional_dep { assert_that(p.cargo("test").arg("-v").arg("--no-run") .arg("--features").arg("a").arg("-p").arg("a"), - execs().with_status(0).with_stdout("\ + execs().with_status(0).with_stderr("\ [COMPILING] a v0.0.1 ([..]) [RUNNING] `rustc a[..]src[..]lib.rs [..]` [RUNNING] `rustc a[..]src[..]lib.rs [..]`