]> git.proxmox.com Git - cargo.git/commitdiff
Linewrap the error message from check_metadata.
authorRalph Giles <giles@mozilla.com>
Thu, 1 Sep 2016 00:04:29 +0000 (17:04 -0700)
committerRalph Giles <giles@mozilla.com>
Thu, 1 Sep 2016 05:05:04 +0000 (22:05 -0700)
This lets test result expected output pass the long-line style check.

src/cargo/ops/cargo_package.rs
tests/package.rs
tests/publish.rs

index 2ed76ab7595b5f338638f443825b8b1cbc115a98..78fde8ed7dd8eae8ce031b8f1270eef605dc612b 100644 (file)
@@ -114,7 +114,7 @@ fn check_metadata(pkg: &Package, config: &Config) -> CargoResult<()> {
         things.push_str(&missing.last().unwrap());
 
         try!(config.shell().warn(
-            &format!("manifest has no {things}. \
+            &format!("manifest has no {things}.\n\
                     See http://doc.crates.io/manifest.html#package-metadata for more info.",
                     things = things)))
     }
index c9bbfd0f72c3c7d08946788e7910153441851dd0..d23cc539aabbfc619eecacbf401b57052e9ae634 100644 (file)
@@ -37,6 +37,7 @@ fn simple() {
     assert_that(p.cargo_process("package"),
                 execs().with_status(0).with_stderr(&format!("\
 [WARNING] manifest has no documentation[..]
+See [..]
 [PACKAGING] foo v0.0.1 ({dir})
 [VERIFYING] foo v0.0.1 ({dir})
 [COMPILING] foo v0.0.1 ({dir}[..])
@@ -82,8 +83,8 @@ fn metadata_warning() {
     assert_that(p.cargo_process("package"),
                 execs().with_status(0).with_stderr(&format!("\
 warning: manifest has no description, license, license-file, documentation, \
-homepage or repository. See \
-http://doc.crates.io/manifest.html#package-metadata for more info.
+homepage or repository.
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] foo v0.0.1 ({dir})
 [VERIFYING] foo v0.0.1 ({dir})
 [COMPILING] foo v0.0.1 ({dir}[..])
@@ -104,8 +105,8 @@ http://doc.crates.io/manifest.html#package-metadata for more info.
         "#);
     assert_that(p.cargo_process("package"),
                 execs().with_status(0).with_stderr(&format!("\
-warning: manifest has no description, documentation, homepage or repository. See \
-http://doc.crates.io/manifest.html#package-metadata for more info.
+warning: manifest has no description, documentation, homepage or repository.
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] foo v0.0.1 ({dir})
 [VERIFYING] foo v0.0.1 ({dir})
 [COMPILING] foo v0.0.1 ({dir}[..])
@@ -165,6 +166,7 @@ fn package_verbose() {
     assert_that(cargo.clone().arg("package").arg("-v").arg("--no-verify"),
                 execs().with_status(0).with_stderr("\
 [WARNING] manifest has no description[..]
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] foo v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -175,6 +177,7 @@ fn package_verbose() {
                      .cwd(p.root().join("a")),
                 execs().with_status(0).with_stderr("\
 [WARNING] manifest has no description[..]
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] a v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -198,6 +201,7 @@ fn package_verification() {
     assert_that(p.cargo("package"),
                 execs().with_status(0).with_stderr(&format!("\
 [WARNING] manifest has no description[..]
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] foo v0.0.1 ({dir})
 [VERIFYING] foo v0.0.1 ({dir})
 [COMPILING] foo v0.0.1 ({dir}[..])
@@ -231,7 +235,8 @@ fn path_dependency_no_version() {
 
     assert_that(p.cargo_process("package"),
                 execs().with_status(101).with_stderr("\
-[WARNING] manifest has no documentation, homepage or repository. See http://doc.crates.io/manifest.html#package-metadata for more info.
+[WARNING] manifest has no documentation, homepage or repository.
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [ERROR] all path dependencies must have a version specified when packaging.
 dependency `bar` does not specify a version.
 "));
@@ -256,6 +261,7 @@ fn exclude() {
     assert_that(p.cargo_process("package").arg("--no-verify").arg("-v"),
                 execs().with_status(0).with_stderr("\
 [WARNING] manifest has no description[..]
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] foo v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -282,6 +288,7 @@ fn include() {
     assert_that(p.cargo_process("package").arg("--no-verify").arg("-v"),
                 execs().with_status(0).with_stderr("\
 [WARNING] manifest has no description[..]
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] foo v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -391,6 +398,7 @@ fn ignore_nested() {
     assert_that(p.cargo_process("package"),
                 execs().with_status(0).with_stderr(&format!("\
 [WARNING] manifest has no documentation[..]
+See http://doc.crates.io/manifest.html#package-metadata for more info.
 [PACKAGING] nested v0.0.1 ({dir})
 [VERIFYING] nested v0.0.1 ({dir})
 [COMPILING] nested v0.0.1 ({dir}[..])
@@ -439,6 +447,7 @@ fn package_weird_characters() {
     assert_that(p.cargo_process("package"),
                 execs().with_status(101).with_stderr("\
 warning: [..]
+See [..]
 [PACKAGING] foo [..]
 [ERROR] failed to prepare local package for uploading
 
@@ -479,6 +488,7 @@ fn repackage_on_source_change() {
     // Check that cargo rebuilds the tarball
     assert_that(pro, execs().with_status(0).with_stderr(&format!("\
 [WARNING] [..]
+See [..]
 [PACKAGING] foo v0.0.1 ({dir})
 [VERIFYING] foo v0.0.1 ({dir})
 [COMPILING] foo v0.0.1 ({dir}[..])
index 38ccad219ff2830bdea4c98d20ce3f1496099400..eb3221b63151ca45d43e9f57f91d67a26f261907 100644 (file)
@@ -60,6 +60,7 @@ fn simple() {
                 execs().with_status(0).with_stderr(&format!("\
 [UPDATING] registry `{reg}`
 [WARNING] manifest has no documentation, [..]
+See [..]
 [PACKAGING] foo v0.0.1 ({dir})
 [UPLOADING] foo v0.0.1 ({dir})
 ",
@@ -357,6 +358,7 @@ fn dry_run() {
                 execs().with_status(0).with_stderr(&format!("\
 [UPDATING] registry `[..]`
 [WARNING] manifest has no documentation, [..]
+See [..]
 [PACKAGING] foo v0.0.1 ({dir})
 [VERIFYING] foo v0.0.1 ({dir})
 [COMPILING] foo v0.0.1 [..]