@@ -5,8 +5,8 @@ use cargo::util::config::{self, Config, SslVersionConfig, StringList};
5
5
use cargo::util::interning::InternedString;
6
6
use cargo::util::toml::{self, VecStringOrBool as VSOB};
7
7
use cargo::CargoResult;
8
- use cargo_test_support::compare::normalized_lines_match ;
9
- use cargo_test_support::{paths, project, t};
8
+ use cargo_test_support::compare;
9
+ use cargo_test_support::{panic_error, paths, project, t};
10
10
use serde::Deserialize;
11
11
use std::borrow::Borrow;
12
12
use std::collections::{BTreeMap, HashMap};
@@ -210,11 +210,8 @@ pub fn assert_error<E: Borrow<anyhow::Error>>(error: E, msgs: &str) {
210
210
211
211
#[track_caller]
212
212
pub fn assert_match(expected: &str, actual: &str) {
213
- if !normalized_lines_match(expected, actual, None) {
214
- panic!(
215
- "Did not find expected:\n{}\nActual:\n{}\n",
216
- expected, actual
217
- );
213
+ if let Err(e) = compare::match_exact(expected, actual, "output", "", None) {
214
+ panic_error("", e);
218
215
}
219
216
}
220
217
@@ -277,15 +274,7 @@ f1 = 1
277
274
278
275
// It should NOT have warned for the symlink.
279
276
let output = read_output(config);
280
- let unexpected = "\
281
- warning: Both `[..]/.cargo/config` and `[..]/.cargo/config.toml` exist. Using `[..]/.cargo/config`
282
- ";
283
- if normalized_lines_match(unexpected, &output, None) {
284
- panic!(
285
- "Found unexpected:\n{}\nActual error:\n{}\n",
286
- unexpected, output
287
- );
288
- }
277
+ assert_eq!(output, "");
289
278
}
290
279
291
280
#[cargo_test]
0 commit comments