File tree Expand file tree Collapse file tree 10 files changed +30
-22
lines changed
cargo_add/build_prefer_existing_version Expand file tree Collapse file tree 10 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ use cargo_test_support::compare::assert;
2
2
use cargo_test_support:: prelude:: * ;
3
3
use cargo_test_support:: Project ;
4
4
5
+ mod build_prefer_existing_version;
6
+
5
7
fn init_registry ( ) {
6
8
cargo_test_support:: registry:: init ( ) ;
7
9
add_registry_packages ( false ) ;
@@ -202,28 +204,6 @@ fn build() {
202
204
assert ( ) . subset_matches ( "tests/snapshots/add/build/out" , & project_root) ;
203
205
}
204
206
205
- #[ cargo_test]
206
- fn build_prefer_existing_version ( ) {
207
- init_alt_registry ( ) ;
208
- let project = Project :: from_template ( "tests/snapshots/add/build_prefer_existing_version/in" ) ;
209
- let project_root = project. root ( ) ;
210
- let cwd = & project_root;
211
-
212
- snapbox:: cmd:: Command :: cargo ( )
213
- . arg ( "add" )
214
- . arg_line ( "cargo-list-test-fixture-dependency --build" )
215
- . current_dir ( cwd)
216
- . assert ( )
217
- . success ( )
218
- . stdout_matches_path ( "tests/snapshots/add/build_prefer_existing_version/stdout.log" )
219
- . stderr_matches_path ( "tests/snapshots/add/build_prefer_existing_version/stderr.log" ) ;
220
-
221
- assert ( ) . subset_matches (
222
- "tests/snapshots/add/build_prefer_existing_version/out" ,
223
- & project_root,
224
- ) ;
225
- }
226
-
227
207
#[ cargo_test]
228
208
fn default_features ( ) {
229
209
init_registry ( ) ;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ use cargo_test_support:: compare:: assert;
2
+ use cargo_test_support:: prelude:: * ;
3
+ use cargo_test_support:: Project ;
4
+
5
+ use crate :: cargo_add:: init_alt_registry;
6
+
7
+ #[ cargo_test]
8
+ fn build_prefer_existing_version ( ) {
9
+ init_alt_registry ( ) ;
10
+ let project =
11
+ Project :: from_template ( "tests/testsuite/cargo_add/build_prefer_existing_version/in" ) ;
12
+ let project_root = project. root ( ) ;
13
+ let cwd = & project_root;
14
+
15
+ snapbox:: cmd:: Command :: cargo ( )
16
+ . arg ( "add" )
17
+ . arg_line ( "cargo-list-test-fixture-dependency --build" )
18
+ . current_dir ( cwd)
19
+ . assert ( )
20
+ . success ( )
21
+ . stdout_matches_path ( "tests/testsuite/cargo_add/build_prefer_existing_version/stdout.log" )
22
+ . stderr_matches_path ( "tests/testsuite/cargo_add/build_prefer_existing_version/stderr.log" ) ;
23
+
24
+ assert ( ) . subset_matches (
25
+ "tests/testsuite/cargo_add/build_prefer_existing_version/out" ,
26
+ & project_root,
27
+ ) ;
28
+ }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments