Fix some trivially fixable tests
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 8 Mar 2018 18:48:38 +0000 (21:48 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 8 Mar 2018 20:31:56 +0000 (23:31 +0300)
tests/testsuite/build.rs
tests/testsuite/check.rs
tests/testsuite/init.rs

index 6a7631f9949b5c4eb533297c9640b561b290f2ea..e530ec2970e83c37ec287e393ba78e080881b9b5 100644 (file)
@@ -3242,7 +3242,6 @@ fn compiler_json_error_format() {
 }
 
 #[test]
-#[ignore]
 fn wrong_message_format_option() {
     let p = project("foo")
         .file("Cargo.toml", &basic_bin_manifest("foo"))
@@ -3251,8 +3250,16 @@ fn wrong_message_format_option() {
 
     assert_that(p.cargo("build").arg("--message-format").arg("XML"),
                 execs().with_status(1)
-                       .with_stderr_contains(
-r#"[ERROR] Could not match 'xml' with any of the allowed variants: ["Human", "Json"]"#));
+                       .with_stderr("\
+error: 'XML' isn't a valid value for '--message-format <FMT>'
+<tab>[possible values: human, json]
+
+
+USAGE:
+    cargo build --message-format <FMT>
+
+For more information try --help
+"));
 }
 
 #[test]
index 53e9407b341b3be7f211b9a3066285e22de526cd..38b7d214ca157b005bcce5a81574d3e3a64c5105 100644 (file)
@@ -331,7 +331,6 @@ fn dylib_check_preserves_build_cache() {
 
 // test `cargo rustc --profile check`
 #[test]
-#[ignore]
 fn rustc_check() {
     let foo = project("foo")
         .file("Cargo.toml", r#"
@@ -371,7 +370,6 @@ fn rustc_check() {
 }
 
 #[test]
-#[ignore]
 fn rustc_check_err() {
     let foo = project("foo")
         .file("Cargo.toml", r#"
index 0c521e7bf23c968757e35d7a6e512e08752c35fa..f80aedf52233042238a4afd3a0ffac0b8601ee92 100644 (file)
@@ -440,16 +440,16 @@ fn with_argument() {
 
 
 #[test]
-#[ignore]
 fn unknown_flags() {
     assert_that(cargo_process("init").arg("foo").arg("--flag"),
                 execs().with_status(1)
                        .with_stderr("\
-[ERROR] Unknown flag: '--flag'
+error: Found argument '--flag' which wasn't expected, or isn't valid in this context
 
-Usage:
-    cargo init [options] [<path>]
-    cargo init -h | --help
+USAGE:
+    cargo init [OPTIONS] [--] [path]
+
+For more information try --help
 "));
 }