Skip to content

Commit 4da73ee

Browse files
committed
test: Add test for issue-14560
1 parent f1d3500 commit 4da73ee

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/testsuite/config.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,29 @@ f1 = 1
299299
assert_e2e().eq(&output, expected);
300300
}
301301

302+
#[cargo_test]
303+
fn config_works_without_extension_run_with_cargo() {
304+
write_config_extless(
305+
"\
306+
[foo]
307+
f1 = 1
308+
",
309+
);
310+
let cargo_home = paths::root().join(".cargo");
311+
let p = project().file("src/lib.rs", "").build();
312+
313+
p.cargo("-vV")
314+
.env("CARGO_HOME", cargo_home)
315+
.with_stderr_data(str![[r#"
316+
[WARNING] `[ROOT]/.cargo/config` is deprecated in favor of `config.toml`
317+
[NOTE] if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
318+
[WARNING] `[ROOT]/.cargo/config` is deprecated in favor of `config.toml`
319+
[NOTE] if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
320+
321+
"#]])
322+
.run();
323+
}
324+
302325
#[cargo_test]
303326
fn config_ambiguous_filename_symlink_doesnt_warn() {
304327
// Windows requires special permissions to create symlinks.

0 commit comments

Comments
 (0)