File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,37 @@ fn simple() {
48
48
assert_eq ! ( gctx. get:: <i32 >( "key3" ) . unwrap( ) , 4 ) ;
49
49
}
50
50
51
+ #[ cargo_test]
52
+ fn enable_in_unstable_config ( ) {
53
+ // config-include enabled in the unstable config table:
54
+ write_config_at (
55
+ ".cargo/config.toml" ,
56
+ "
57
+ include = 'other.toml'
58
+ key1 = 1
59
+ key2 = 2
60
+
61
+ [unstable]
62
+ config-include = true
63
+ " ,
64
+ ) ;
65
+ write_config_at (
66
+ ".cargo/other.toml" ,
67
+ "
68
+ key2 = 3
69
+ key3 = 4
70
+ " ,
71
+ ) ;
72
+ let gctx = GlobalContextBuilder :: new ( )
73
+ . nightly_features_allowed ( true )
74
+ . build ( ) ;
75
+ // On this commit, enabling `config-include` in the top-level
76
+ // configuration does not yet work.
77
+ assert_eq ! ( gctx. get:: <i32 >( "key1" ) . unwrap( ) , 1 ) ;
78
+ assert_eq ! ( gctx. get:: <i32 >( "key2" ) . unwrap( ) , 2 ) ;
79
+ assert_eq ! ( gctx. get:: <i32 >( "key3" ) . ok( ) , None ) ;
80
+ }
81
+
51
82
#[ cargo_test]
52
83
fn works_with_cli ( ) {
53
84
write_config_at (
You can’t perform that action at this time.
0 commit comments