@@ -29,17 +29,16 @@ fn depend_on_alt_registry() {
29
29
Package :: new ( "bar" , "0.0.1" ) . alternative ( true ) . publish ( ) ;
30
30
31
31
p. cargo ( "build" )
32
- . with_stderr ( & format ! (
32
+ . with_stderr (
33
33
"\
34
- [UPDATING] `{reg} ` index
34
+ [UPDATING] `alternative ` index
35
35
[DOWNLOADING] crates ...
36
- [DOWNLOADED] bar v0.0.1 (registry `[ROOT][..] `)
37
- [COMPILING] bar v0.0.1 (registry `[ROOT][..] `)
36
+ [DOWNLOADED] bar v0.0.1 (registry `alternative `)
37
+ [COMPILING] bar v0.0.1 (registry `alternative `)
38
38
[COMPILING] foo v0.0.1 ([CWD])
39
39
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
40
40
" ,
41
- reg = registry:: alt_registry_path( ) . to_str( ) . unwrap( )
42
- ) )
41
+ )
43
42
. run ( ) ;
44
43
45
44
p. cargo ( "clean" ) . run ( ) ;
@@ -48,7 +47,7 @@ fn depend_on_alt_registry() {
48
47
p. cargo ( "build" )
49
48
. with_stderr (
50
49
"\
51
- [COMPILING] bar v0.0.1 (registry `[ROOT][..] `)
50
+ [COMPILING] bar v0.0.1 (registry `alternative `)
52
51
[COMPILING] foo v0.0.1 ([CWD])
53
52
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
54
53
" ,
@@ -83,19 +82,18 @@ fn depend_on_alt_registry_depends_on_same_registry_no_index() {
83
82
. publish ( ) ;
84
83
85
84
p. cargo ( "build" )
86
- . with_stderr ( & format ! (
85
+ . with_stderr (
87
86
"\
88
- [UPDATING] `{reg} ` index
87
+ [UPDATING] `alternative ` index
89
88
[DOWNLOADING] crates ...
90
- [DOWNLOADED] [..] v0.0.1 (registry `[ROOT][..] `)
91
- [DOWNLOADED] [..] v0.0.1 (registry `[ROOT][..] `)
92
- [COMPILING] baz v0.0.1 (registry `[ROOT][..] `)
93
- [COMPILING] bar v0.0.1 (registry `[ROOT][..] `)
89
+ [DOWNLOADED] [..] v0.0.1 (registry `alternative `)
90
+ [DOWNLOADED] [..] v0.0.1 (registry `alternative `)
91
+ [COMPILING] baz v0.0.1 (registry `alternative `)
92
+ [COMPILING] bar v0.0.1 (registry `alternative `)
94
93
[COMPILING] foo v0.0.1 ([CWD])
95
94
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
96
95
" ,
97
- reg = registry:: alt_registry_path( ) . to_str( ) . unwrap( )
98
- ) )
96
+ )
99
97
. run ( ) ;
100
98
}
101
99
@@ -126,19 +124,18 @@ fn depend_on_alt_registry_depends_on_same_registry() {
126
124
. publish ( ) ;
127
125
128
126
p. cargo ( "build" )
129
- . with_stderr ( & format ! (
127
+ . with_stderr (
130
128
"\
131
- [UPDATING] `{reg} ` index
129
+ [UPDATING] `alternative ` index
132
130
[DOWNLOADING] crates ...
133
- [DOWNLOADED] [..] v0.0.1 (registry `[ROOT][..] `)
134
- [DOWNLOADED] [..] v0.0.1 (registry `[ROOT][..] `)
135
- [COMPILING] baz v0.0.1 (registry `[ROOT][..] `)
136
- [COMPILING] bar v0.0.1 (registry `[ROOT][..] `)
131
+ [DOWNLOADED] [..] v0.0.1 (registry `alternative `)
132
+ [DOWNLOADED] [..] v0.0.1 (registry `alternative `)
133
+ [COMPILING] baz v0.0.1 (registry `alternative `)
134
+ [COMPILING] bar v0.0.1 (registry `alternative `)
137
135
[COMPILING] foo v0.0.1 ([CWD])
138
136
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
139
137
" ,
140
- reg = registry:: alt_registry_path( ) . to_str( ) . unwrap( )
141
- ) )
138
+ )
142
139
. run ( ) ;
143
140
}
144
141
@@ -169,21 +166,19 @@ fn depend_on_alt_registry_depends_on_crates_io() {
169
166
. publish ( ) ;
170
167
171
168
p. cargo ( "build" )
172
- . with_stderr_unordered ( & format ! (
169
+ . with_stderr_unordered (
173
170
"\
174
- [UPDATING] `{alt_reg} ` index
175
- [UPDATING] `{reg} ` index
171
+ [UPDATING] `alternative ` index
172
+ [UPDATING] `dummy-registry ` index
176
173
[DOWNLOADING] crates ...
177
- [DOWNLOADED] baz v0.0.1 (registry `[ROOT][..] `)
178
- [DOWNLOADED] bar v0.0.1 (registry `[ROOT][..] `)
174
+ [DOWNLOADED] baz v0.0.1 (registry `dummy-registry `)
175
+ [DOWNLOADED] bar v0.0.1 (registry `alternative `)
179
176
[COMPILING] baz v0.0.1
180
- [COMPILING] bar v0.0.1 (registry `[ROOT][..] `)
177
+ [COMPILING] bar v0.0.1 (registry `alternative `)
181
178
[COMPILING] foo v0.0.1 ([CWD])
182
179
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
183
180
" ,
184
- alt_reg = registry:: alt_registry_path( ) . to_str( ) . unwrap( ) ,
185
- reg = registry:: registry_path( ) . to_str( ) . unwrap( )
186
- ) )
181
+ )
187
182
. run ( ) ;
188
183
}
189
184
@@ -403,20 +398,19 @@ fn alt_registry_and_crates_io_deps() {
403
398
. publish ( ) ;
404
399
405
400
p. cargo ( "build" )
406
- . with_stderr_contains ( format ! (
407
- "[UPDATING] `{}` index" ,
408
- registry:: alt_registry_path( ) . to_str( ) . unwrap( )
409
- ) )
410
- . with_stderr_contains ( & format ! (
411
- "[UPDATING] `{}` index" ,
412
- registry:: registry_path( ) . to_str( ) . unwrap( )
413
- ) )
414
- . with_stderr_contains ( "[DOWNLOADED] crates_io_dep v0.0.1 (registry `[ROOT][..]`)" )
415
- . with_stderr_contains ( "[DOWNLOADED] alt_reg_dep v0.1.0 (registry `[ROOT][..]`)" )
416
- . with_stderr_contains ( "[COMPILING] alt_reg_dep v0.1.0 (registry `[ROOT][..]`)" )
417
- . with_stderr_contains ( "[COMPILING] crates_io_dep v0.0.1" )
418
- . with_stderr_contains ( "[COMPILING] foo v0.0.1 ([CWD])" )
419
- . with_stderr_contains ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s" )
401
+ . with_stderr_unordered (
402
+ "\
403
+ [UPDATING] `alternative` index
404
+ [UPDATING] `dummy-registry` index
405
+ [DOWNLOADING] crates ...
406
+ [DOWNLOADED] crates_io_dep v0.0.1 (registry `dummy-registry`)
407
+ [DOWNLOADED] alt_reg_dep v0.1.0 (registry `alternative`)
408
+ [COMPILING] alt_reg_dep v0.1.0 (registry `alternative`)
409
+ [COMPILING] crates_io_dep v0.0.1
410
+ [COMPILING] foo v0.0.1 ([CWD])
411
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
412
+ " ,
413
+ )
420
414
. run ( ) ;
421
415
}
422
416
@@ -607,7 +601,7 @@ fn patch_alt_reg() {
607
601
p. cargo ( "build" )
608
602
. with_stderr (
609
603
"\
610
- [UPDATING] `[ROOT][..] ` index
604
+ [UPDATING] `alternative ` index
611
605
[COMPILING] bar v0.1.0 ([CWD]/bar)
612
606
[COMPILING] foo v0.0.1 ([CWD])
613
607
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
@@ -697,24 +691,20 @@ fn no_api() {
697
691
. build ( ) ;
698
692
699
693
p. cargo ( "build" )
700
- . with_stderr ( & format ! (
694
+ . with_stderr (
701
695
"\
702
- [UPDATING] `{reg} ` index
696
+ [UPDATING] `alternative ` index
703
697
[DOWNLOADING] crates ...
704
- [DOWNLOADED] bar v0.0.1 (registry `[ROOT][..] `)
705
- [COMPILING] bar v0.0.1 (registry `[ROOT][..] `)
698
+ [DOWNLOADED] bar v0.0.1 (registry `alternative `)
699
+ [COMPILING] bar v0.0.1 (registry `alternative `)
706
700
[COMPILING] foo v0.0.1 ([CWD])
707
701
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
708
702
" ,
709
- reg = registry:: alt_registry_path( ) . to_str( ) . unwrap( )
710
- ) )
703
+ )
711
704
. run ( ) ;
712
705
713
706
// Check all of the API commands.
714
- let err = format ! (
715
- "[ERROR] registry `{}` does not support API commands" ,
716
- registry:: alt_registry_path( ) . display( )
717
- ) ;
707
+ let err = "[ERROR] registry `alternative` does not support API commands" ;
718
708
719
709
p. cargo ( "login --registry alternative TOKEN" )
720
710
. with_status ( 101 )
@@ -1244,17 +1234,16 @@ fn registries_index_relative_url() {
1244
1234
Package :: new ( "bar" , "0.0.1" ) . alternative ( true ) . publish ( ) ;
1245
1235
1246
1236
p. cargo ( "build" )
1247
- . with_stderr ( & format ! (
1237
+ . with_stderr (
1248
1238
"\
1249
- [UPDATING] `{reg} ` index
1239
+ [UPDATING] `relative ` index
1250
1240
[DOWNLOADING] crates ...
1251
- [DOWNLOADED] bar v0.0.1 (registry `[ROOT][..] `)
1252
- [COMPILING] bar v0.0.1 (registry `[ROOT][..] `)
1241
+ [DOWNLOADED] bar v0.0.1 (registry `relative `)
1242
+ [COMPILING] bar v0.0.1 (registry `relative `)
1253
1243
[COMPILING] foo v0.0.1 ([CWD])
1254
1244
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
1255
1245
" ,
1256
- reg = registry:: alt_registry_path( ) . to_str( ) . unwrap( )
1257
- ) )
1246
+ )
1258
1247
. run ( ) ;
1259
1248
}
1260
1249
0 commit comments