Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop the [/] test output macro #5851

Merged
merged 2 commits into from
Aug 2, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/testsuite/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,6 @@ impl Execs {
// Let's not deal with \r\n vs \n on windows...
let actual = actual.replace("\r", "");
let actual = actual.replace("\t", "<tab>");
// or / vs \
let actual = actual.replace("\\", "/");

match kind {
MatchKind::Exact => {
Expand Down Expand Up @@ -1020,8 +1018,11 @@ enum MatchKind {
/// - There is a wide range of macros (such as `[COMPILING]` or `[WARNING]`)
/// to match cargo's "status" output and allows you to ignore the alignment.
/// See `substitute_macros` for a complete list of macros.
pub fn lines_match(expected: &str, mut actual: &str) -> bool {
let expected = substitute_macros(expected);
pub fn lines_match(expected: &str, actual: &str) -> bool {
// Let's not deal with / vs \ (windows...)
let expected = expected.replace("\\", "/");
let mut actual: &str = &actual.replace("\\", "/");
let expected = substitute_macros(&expected);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change moved to here

for (i, part) in expected.split("[..]").enumerate() {
match actual.find(part) {
Some(j) => {
Expand Down