Convert line endings when doing exact pretty-print testing

For the benefit of windows
This commit is contained in:
Brian Anderson 2011-08-03 15:36:45 -07:00
parent 4ae6c835cb
commit 89f2c43cf3
1 changed files with 8 additions and 0 deletions

View File

@ -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);