diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-03 15:36:45 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-03 15:37:51 -0700 |
| commit | 89f2c43cf3288cab664fc5a3ff55fa76e1c3ac21 (patch) | |
| tree | 01f1e5fdb3998477982fd8e36378db592510e37b /src/test | |
| parent | 4ae6c835cb69332e982babcfca1a4e5657ec8bbd (diff) | |
| download | rust-89f2c43cf3288cab664fc5a3ff55fa76e1c3ac21.tar.gz rust-89f2c43cf3288cab664fc5a3ff55fa76e1c3ac21.zip | |
Convert line endings when doing exact pretty-print testing
For the benefit of windows
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compiletest/runtest.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/compiletest/runtest.rs b/src/test/compiletest/runtest.rs index 37a10633b07..cedfb708cfa 100644 --- a/src/test/compiletest/runtest.rs +++ b/src/test/compiletest/runtest.rs @@ -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); |
