Skip to content

Commit

Permalink
test: Add test for issue-14560
Browse files Browse the repository at this point in the history
  • Loading branch information
linyihai committed Sep 23, 2024
1 parent f1d3500 commit 4da73ee
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/testsuite/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,29 @@ f1 = 1
assert_e2e().eq(&output, expected);
}

#[cargo_test]
fn config_works_without_extension_run_with_cargo() {
write_config_extless(
"\
[foo]
f1 = 1
",
);
let cargo_home = paths::root().join(".cargo");
let p = project().file("src/lib.rs", "").build();

p.cargo("-vV")
.env("CARGO_HOME", cargo_home)
.with_stderr_data(str![[r#"
[WARNING] `[ROOT]/.cargo/config` is deprecated in favor of `config.toml`
[NOTE] if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
[WARNING] `[ROOT]/.cargo/config` is deprecated in favor of `config.toml`
[NOTE] if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
"#]])
.run();
}

#[cargo_test]
fn config_ambiguous_filename_symlink_doesnt_warn() {
// Windows requires special permissions to create symlinks.
Expand Down

0 comments on commit 4da73ee

Please sign in to comment.