mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-10 14:57:14 +00:00
Convert line endings when doing exact pretty-print testing
For the benefit of windows
This commit is contained in:
parent
4ae6c835cb
commit
89f2c43cf3
@ -113,6 +113,14 @@ fn run_pretty_test(cx: &cx, props: &test_props, testfile: &str) {
|
||||
}
|
||||
};
|
||||
let actual = srcs.(ivec::len(srcs) - 1u);
|
||||
|
||||
if option::is_some(props.pp_exact) {
|
||||
// Now we have to care about line endings
|
||||
let cr = "\r";
|
||||
check str::is_not_empty(cr);
|
||||
actual = str::replace(actual, cr, "");
|
||||
expected = str::replace(expected, cr, "");
|
||||
}
|
||||
|
||||
compare_source(expected, actual);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user