From d7ffef777ac24f936451a50450d0064ea86d18b1 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Fri, 26 Apr 2019 22:31:55 +0900 Subject: [PATCH 1/2] feat: Fill in some fields from the beginning when cargo new --- src/cargo/ops/cargo_new.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cargo/ops/cargo_new.rs b/src/cargo/ops/cargo_new.rs index 8ee61b2e80c..d72c91f0c21 100644 --- a/src/cargo/ops/cargo_new.rs +++ b/src/cargo/ops/cargo_new.rs @@ -618,6 +618,8 @@ version = "0.1.0" authors = [{}] edition = {} {} +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + [dependencies] {}"#, name, From f781d2df86c4215f1a4ec36772b9ee68e6b5d206 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Mon, 29 Apr 2019 23:54:52 +0900 Subject: [PATCH 2/2] test: Add reference link test --- tests/testsuite/new.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index 5076107e7a4..9dc44d079bb 100644 --- a/tests/testsuite/new.rs +++ b/tests/testsuite/new.rs @@ -522,3 +522,11 @@ fn new_with_blank_email() { let contents = fs::read_to_string(paths::root().join("foo/Cargo.toml")).unwrap(); assert!(contents.contains(r#"authors = ["Sen"]"#), contents); } + +#[test] +fn new_with_reference_link() { + cargo_process("new foo").env("USER", "foo").run(); + + let contents = fs::read_to_string(paths::root().join("foo/Cargo.toml")).unwrap(); + assert!(contents.contains("# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html")) +}