From b03a0b27aa6fd0d2b8be4434c73ad45311e292fc Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Tue, 28 May 2013 20:41:35 +0200 Subject: [PATCH] make pp file conform to actual output, noting some oddities along the way. --- src/test/pretty/block-comment-wchar.pp | 46 +++++++++++++++----------- src/test/pretty/block-comment-wchar.rs | 19 +++++------ 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/test/pretty/block-comment-wchar.pp b/src/test/pretty/block-comment-wchar.pp index b591b83ee37e..9c80057ccef0 100644 --- a/src/test/pretty/block-comment-wchar.pp +++ b/src/test/pretty/block-comment-wchar.pp @@ -81,30 +81,36 @@ fn f() { Mongolian Vowel Sep count F: (should align) */ -/* */ /* - Hello from offset 6 - Space 6+2: compare A - Mongolian Vowel Separator 6+2: compare B - */ -/*᠎*/ /* - Hello from another offset 6 with wchars establishing column offset - Space 6+2: compare C - Mongolian Vowel Separator 6+2: compare D - */ + + + /* */ + + /* + Hello from offset 6 + Space 6+2: compare A + Mongolian Vowel Separator 6+2: compare B + */ + + /*᠎*/ + + /* + Hello from another offset 6 with wchars establishing column offset + Space 6+2: compare C + Mongolian Vowel Separator 6+2: compare D + */ } fn main() { // Taken from http://en.wikipedia.org/wiki/Whitespace_character - let chars = [ '\x0A', '\x0B', '\x0C', '\x0D', '\x20', - // '\x85', // for some reason Rust thinks NEL isn't whitespace - '\xA0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', - '\u2004', '\u2005', '\u2006', '\u2007', - '\u2008', '\u2009', '\u200A', - '\u2028', '\u2029', '\u202F', '\u205F', - '\u3000' - ]; + let chars = + ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', + // '\x85', // for some reason Rust thinks NEL isn't whitespace + '\xA0', '\u1680', '\u180E', '\u2000', '\u2001', '\u2002', '\u2003', + '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A', + '\u2028', '\u2029', '\u202F', '\u205F', '\u3000']; + // <= bugs in pretty-printer? for vec::each(chars) |c| { - io::println(fmt!("%? %?", c, c.is_whitespace())); + let ws = c.is_whitespace(); + io::println(fmt!("%? %?" , c , ws)); } } diff --git a/src/test/pretty/block-comment-wchar.rs b/src/test/pretty/block-comment-wchar.rs index 421857850b50..a56fa91f39f0 100644 --- a/src/test/pretty/block-comment-wchar.rs +++ b/src/test/pretty/block-comment-wchar.rs @@ -81,6 +81,7 @@ fn f() { ᠎᠎᠎᠎ Mongolian Vowel Sep count F: (should align) */ + /* */ /* Hello from offset 6 Space 6+2: compare A @@ -95,16 +96,14 @@ fn f() { fn main() { // Taken from http://en.wikipedia.org/wiki/Whitespace_character - let chars = [ '\x0A', '\x0B', '\x0C', '\x0D', '\x20', - // '\x85', // for some reason Rust thinks NEL isn't whitespace - '\xA0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', - '\u2004', '\u2005', '\u2006', '\u2007', - '\u2008', '\u2009', '\u200A', - '\u2028', '\u2029', '\u202F', '\u205F', - '\u3000' - ]; + let chars = + ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', + // '\x85', // for some reason Rust thinks NEL isn't whitespace + '\xA0', '\u1680', '\u180E', '\u2000', '\u2001', '\u2002', '\u2003', + '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A', + '\u2028', '\u2029', '\u202F', '\u205F', '\u3000']; for vec::each(chars) |c| { - io::println(fmt!("%? %?", c, c.is_whitespace())); + let ws = c.is_whitespace(); + io::println(fmt!("%? %?", c , ws)); // <= bugs in pretty-printer? } }