diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-06-26 21:53:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 15:53:17 -0400 |
commit | a8d472f88e79703b1890bfdc87d7a3bb20b21428 (patch) | |
tree | d2c2daf1261d6dbcce7852368550d56c134bc97e /test_util/src/assertions.rs | |
parent | fa935e553a9ec37d39d2274432a00f1b465cef0f (diff) |
feat(lock): skip saving declaration files in the lockfile (#19447)
This is also a performance improvement because declaration file hashes
don't need to be stored in the lockfile.
Closes #19444
Diffstat (limited to 'test_util/src/assertions.rs')
-rw-r--r-- | test_util/src/assertions.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test_util/src/assertions.rs b/test_util/src/assertions.rs index 29066ded0..239e0e99c 100644 --- a/test_util/src/assertions.rs +++ b/test_util/src/assertions.rs @@ -49,3 +49,14 @@ macro_rules! assert_not_contains { } } } + +#[track_caller] +pub fn assert_wildcard_match(actual: &str, expected: &str) { + if !expected.contains("[WILDCARD]") { + pretty_assertions::assert_eq!(actual, expected); + } else if !crate::wildcard_match(expected, actual) { + println!("OUTPUT START\n{actual}\nOUTPUT END"); + println!("EXPECTED START\n{expected}\nEXPECTED END"); + panic!("pattern match failed"); + } +} |