@@ -16,7 +16,7 @@ use cargo::CargoResult;
16
16
use cargo_test_support:: compare:: assert_e2e;
17
17
use cargo_test_support:: prelude:: * ;
18
18
use cargo_test_support:: str;
19
- use cargo_test_support:: { paths, project, symlink_supported, t} ;
19
+ use cargo_test_support:: { paths, project, project_in_home , symlink_supported, t} ;
20
20
use cargo_util_schemas:: manifest:: TomlTrimPaths ;
21
21
use cargo_util_schemas:: manifest:: TomlTrimPathsValue ;
22
22
use cargo_util_schemas:: manifest:: { self as cargo_toml, TomlDebugInfo , VecStringOrBool as VSOB } ;
@@ -299,6 +299,28 @@ f1 = 1
299
299
assert_e2e ( ) . eq ( & output, expected) ;
300
300
}
301
301
302
+ #[ cargo_test]
303
+ fn home_config_works_without_extension ( ) {
304
+ write_config_at (
305
+ paths:: cargo_home ( ) . join ( "config" ) ,
306
+ "\
307
+ [foo]
308
+ f1 = 1
309
+ " ,
310
+ ) ;
311
+ let p = project_in_home ( "foo" ) . file ( "src/lib.rs" , "" ) . build ( ) ;
312
+
313
+ p. cargo ( "-vV" )
314
+ . with_stderr_data ( str![ [ r#"
315
+ [WARNING] `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml`
316
+ [NOTE] if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
317
+ [WARNING] `[ROOT]/home/.cargo/config` is deprecated in favor of `config.toml`
318
+ [NOTE] if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
319
+
320
+ "# ] ] )
321
+ . run ( ) ;
322
+ }
323
+
302
324
#[ cargo_test]
303
325
fn config_ambiguous_filename_symlink_doesnt_warn ( ) {
304
326
// Windows requires special permissions to create symlinks.
0 commit comments