@@ -66,50 +66,6 @@ fn replace() {
66
66
p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
67
67
}
68
68
69
- #[ cargo_test]
70
- fn from_config_without_z ( ) {
71
- Package :: new ( "bar" , "0.1.0" ) . publish ( ) ;
72
-
73
- let p = project ( )
74
- . file (
75
- "Cargo.toml" ,
76
- r#"
77
- [package]
78
- name = "foo"
79
- version = "0.0.1"
80
- authors = []
81
-
82
- [dependencies]
83
- bar = "0.1.0"
84
- "# ,
85
- )
86
- . file (
87
- ".cargo/config.toml" ,
88
- r#"
89
- [patch.crates-io]
90
- bar = { path = 'bar' }
91
- "# ,
92
- )
93
- . file ( "src/lib.rs" , "" )
94
- . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.1" ) )
95
- . file ( "bar/src/lib.rs" , r#""# )
96
- . build ( ) ;
97
-
98
- p. cargo ( "build" )
99
- . with_stderr (
100
- "\
101
- [WARNING] `[patch]` in cargo config was ignored, the -Zpatch-in-config command-line flag is required
102
- [UPDATING] `dummy-registry` index
103
- [DOWNLOADING] crates ...
104
- [DOWNLOADED] bar v0.1.0 ([..])
105
- [COMPILING] bar v0.1.0
106
- [COMPILING] foo v0.0.1 ([CWD])
107
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
108
- " ,
109
- )
110
- . run ( ) ;
111
- }
112
-
113
69
#[ cargo_test]
114
70
fn from_config ( ) {
115
71
Package :: new ( "bar" , "0.1.0" ) . publish ( ) ;
@@ -139,8 +95,7 @@ fn from_config() {
139
95
. file ( "bar/src/lib.rs" , r#""# )
140
96
. build ( ) ;
141
97
142
- p. cargo ( "build -Zpatch-in-config" )
143
- . masquerade_as_nightly_cargo ( )
98
+ p. cargo ( "build" )
144
99
. with_stderr (
145
100
"\
146
101
[UPDATING] `dummy-registry` index
@@ -181,8 +136,7 @@ fn from_config_relative() {
181
136
. file ( "bar/src/lib.rs" , r#""# )
182
137
. build ( ) ;
183
138
184
- p. cargo ( "build -Zpatch-in-config" )
185
- . masquerade_as_nightly_cargo ( )
139
+ p. cargo ( "build" )
186
140
. with_stderr (
187
141
"\
188
142
[UPDATING] `dummy-registry` index
@@ -226,8 +180,7 @@ fn from_config_precedence() {
226
180
. file ( "bar/src/lib.rs" , r#""# )
227
181
. build ( ) ;
228
182
229
- p. cargo ( "build -Zpatch-in-config" )
230
- . masquerade_as_nightly_cargo ( )
183
+ p. cargo ( "build" )
231
184
. with_stderr (
232
185
"\
233
186
[UPDATING] `dummy-registry` index
@@ -519,8 +472,7 @@ fn unused_from_config() {
519
472
. file ( "bar/src/lib.rs" , "not rust code" )
520
473
. build ( ) ;
521
474
522
- p. cargo ( "build -Zpatch-in-config" )
523
- . masquerade_as_nightly_cargo ( )
475
+ p. cargo ( "build" )
524
476
. with_stderr (
525
477
"\
526
478
[UPDATING] `dummy-registry` index
@@ -537,8 +489,7 @@ fn unused_from_config() {
537
489
" ,
538
490
)
539
491
. run ( ) ;
540
- p. cargo ( "build -Zpatch-in-config" )
541
- . masquerade_as_nightly_cargo ( )
492
+ p. cargo ( "build" )
542
493
. with_stderr (
543
494
"\
544
495
[WARNING] Patch `bar v0.2.0 ([CWD]/bar)` was not used in the crate graph.
@@ -733,8 +684,7 @@ fn add_patch_from_config() {
733
684
"# ,
734
685
) ;
735
686
736
- p. cargo ( "build -Zpatch-in-config" )
737
- . masquerade_as_nightly_cargo ( )
687
+ p. cargo ( "build" )
738
688
. with_stderr (
739
689
"\
740
690
[COMPILING] bar v0.1.0 ([CWD]/bar)
@@ -743,10 +693,7 @@ fn add_patch_from_config() {
743
693
" ,
744
694
)
745
695
. run ( ) ;
746
- p. cargo ( "build -Zpatch-in-config" )
747
- . masquerade_as_nightly_cargo ( )
748
- . with_stderr ( "[FINISHED] [..]" )
749
- . run ( ) ;
696
+ p. cargo ( "build" ) . with_stderr ( "[FINISHED] [..]" ) . run ( ) ;
750
697
}
751
698
752
699
#[ cargo_test]
0 commit comments