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