make pp file conform to actual output, noting some oddities along the way.
This commit is contained in:
parent
0f4d5c2134
commit
b03a0b27aa
2 changed files with 35 additions and 30 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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?
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue