|
3 | 3 | use cargo_test_support::prelude::*;
|
4 | 4 | use cargo_test_support::project;
|
5 | 5 | use cargo_test_support::registry::{Package, RegistryBuilder, TestRegistry};
|
| 6 | +use cargo_test_support::str; |
6 | 7 |
|
7 | 8 | fn setup() -> (TestRegistry, String) {
|
8 | 9 | let alt = RegistryBuilder::new().alternative().build();
|
@@ -77,17 +78,16 @@ fn registry_version_wins() {
|
77 | 78 |
|
78 | 79 | p.cargo("check")
|
79 | 80 | .overlay_registry(®.index_url(), &alt_path)
|
80 |
| - .with_stderr_data( |
81 |
| - "\ |
82 |
| -[UPDATING] [..] |
| 81 | + .with_stderr_data(str![[r#" |
| 82 | +[UPDATING] `sparse+http://127.0.0.1:[..]/index/` index |
83 | 83 | [LOCKING] 1 package to latest compatible version
|
84 | 84 | [DOWNLOADING] crates ...
|
85 |
| -[DOWNLOADED] baz v0.1.1 (registry [..]) |
| 85 | +[DOWNLOADED] baz v0.1.1 (registry `sparse+http://127.0.0.1:[..]/index/`) |
86 | 86 | [CHECKING] baz v0.1.1
|
87 | 87 | [CHECKING] foo v0.0.1 ([ROOT]/foo)
|
88 | 88 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
|
89 |
| -", |
90 |
| - ) |
| 89 | +
|
| 90 | +"#]]) |
91 | 91 | .run();
|
92 | 92 | }
|
93 | 93 |
|
@@ -120,16 +120,15 @@ fn overlay_version_wins() {
|
120 | 120 |
|
121 | 121 | p.cargo("check")
|
122 | 122 | .overlay_registry(®.index_url(), &alt_path)
|
123 |
| - .with_stderr_data( |
124 |
| - "\ |
125 |
| -[UPDATING] [..] |
| 123 | + .with_stderr_data(str![[r#" |
| 124 | +[UPDATING] `sparse+http://127.0.0.1:[..]/index/` index |
126 | 125 | [LOCKING] 1 package to latest compatible version
|
127 |
| -[UNPACKING] baz v0.1.1 (registry [..]) |
| 126 | +[UNPACKING] baz v0.1.1 (registry `[ROOT]/alternative-registry`) |
128 | 127 | [CHECKING] baz v0.1.1
|
129 | 128 | [CHECKING] foo v0.0.1 ([ROOT]/foo)
|
130 | 129 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
|
131 |
| -", |
132 |
| - ) |
| 130 | +
|
| 131 | +"#]]) |
133 | 132 | .run();
|
134 | 133 | }
|
135 | 134 |
|
@@ -163,18 +162,17 @@ fn version_collision() {
|
163 | 162 | p.cargo("check")
|
164 | 163 | .overlay_registry(®.index_url(), &alt_path)
|
165 | 164 | .with_status(101)
|
166 |
| - .with_stderr_data( |
167 |
| - "\ |
168 |
| -[UPDATING] [..] |
169 |
| -[ERROR] failed to get `baz` [..] |
| 165 | + .with_stderr_data(str![[r#" |
| 166 | +[UPDATING] `sparse+http://127.0.0.1:[..]/index/` index |
| 167 | +[ERROR] failed to get `baz` as a dependency of package `foo v0.0.1 ([ROOT]/foo)` |
170 | 168 |
|
171 | 169 | Caused by:
|
172 | 170 | failed to query replaced source registry `crates-io`
|
173 | 171 |
|
174 | 172 | Caused by:
|
175 | 173 | found a package in the remote registry and the local overlay: [email protected]
|
176 |
| -", |
177 |
| - ) |
| 174 | +
|
| 175 | +"#]]) |
178 | 176 | .run();
|
179 | 177 | }
|
180 | 178 |
|
@@ -248,22 +246,21 @@ fn registry_dep_depends_on_new_local_package() {
|
248 | 246 |
|
249 | 247 | p.cargo("check")
|
250 | 248 | .overlay_registry(®.index_url(), &alt_path)
|
251 |
| - .with_stderr_data( |
252 |
| - "\ |
253 |
| -[UPDATING] [..] |
| 249 | + .with_stderr_data(str![[r#" |
| 250 | +[UPDATING] `sparse+http://127.0.0.1:[..]/index/` index |
254 | 251 | [LOCKING] 3 packages to latest compatible versions
|
255 | 252 | [ADDING] workspace-package v0.0.1 (available: v0.1.1)
|
256 | 253 | [DOWNLOADING] crates ...
|
257 |
| -[UNPACKING] [..] |
258 |
| -[DOWNLOADED] [..] |
259 |
| -[DOWNLOADED] [..] |
| 254 | +[UNPACKING] workspace-package v0.1.1 (registry `[ROOT]/alternative-registry`) |
| 255 | +[DOWNLOADED] registry-package v0.1.0 (registry `sparse+http://127.0.0.1:[..]/index/`) |
| 256 | +[DOWNLOADED] workspace-package v0.0.1 (registry `sparse+http://127.0.0.1:[..]/index/`) |
260 | 257 | [CHECKING] workspace-package v0.1.1
|
261 | 258 | [CHECKING] workspace-package v0.0.1
|
262 | 259 | [CHECKING] registry-package v0.1.0
|
263 |
| -[CHECKING] foo v0.0.1 [..] |
| 260 | +[CHECKING] foo v0.0.1 ([ROOT]/foo) |
264 | 261 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
|
265 |
| -", |
266 |
| - ) |
| 262 | +
|
| 263 | +"#]]) |
267 | 264 | .run();
|
268 | 265 | }
|
269 | 266 |
|
|
0 commit comments