We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NAME
cargo new
1 parent 0e186bf commit 2fb90adCopy full SHA for 2fb90ad
tests/testsuite/new.rs
@@ -212,6 +212,23 @@ fn finds_author_username() {
212
assert!(contents.contains(r#"authors = ["foo"]"#));
213
}
214
215
+#[cargo_test]
216
+fn finds_author_name() {
217
+ create_empty_gitconfig();
218
+ cargo_process("new foo")
219
+ .env_remove("USERNAME")
220
+ .env("NAME", "foo")
221
+ .run();
222
+
223
+ let toml = paths::root().join("foo/Cargo.toml");
224
+ let mut contents = String::new();
225
+ File::open(&toml)
226
+ .unwrap()
227
+ .read_to_string(&mut contents)
228
+ .unwrap();
229
+ assert!(contents.contains(r#"authors = ["foo"]"#));
230
+}
231
232
#[cargo_test]
233
fn finds_author_priority() {
234
cargo_process("new foo")
0 commit comments