2013-05-27 10:08:37 +00:00
|
|
|
|
// This is meant as a test case for Issue 3961.
|
|
|
|
|
//
|
2021-03-25 19:48:21 +00:00
|
|
|
|
// Test via: rustc -Zunpretty normal src/test/pretty/block-comment-wchar.rs
|
2014-02-07 19:08:32 +00:00
|
|
|
|
// ignore-tidy-cr
|
|
|
|
|
// ignore-tidy-tab
|
2013-05-28 17:17:17 +00:00
|
|
|
|
// pp-exact:block-comment-wchar.pp
|
2013-05-27 10:08:37 +00:00
|
|
|
|
fn f() {
|
|
|
|
|
fn nested() {
|
|
|
|
|
/*
|
|
|
|
|
Spaced2
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Spaced10
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Tabbed8+2
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
CR8+2
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
Spaced2: (prefixed so start of space aligns with comment)
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Tabbed2: (more indented b/c *start* of space will align with comment)
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Spaced6: (Alignment removed and realigning spaces inserted)
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Tabbed4+2: (Alignment removed and realigning spaces inserted)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
VT4+2: (should align)
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
FF4+2: (should align)
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
CR4+2: (should align)
|
|
|
|
|
*/
|
|
|
|
|
/*
|
2013-11-26 05:15:45 +00:00
|
|
|
|
NEL4+2: (should align)
|
2013-05-27 10:08:37 +00:00
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Ogham Space Mark 4+2: (should align)
|
|
|
|
|
*/
|
|
|
|
|
/*
|
2013-11-23 17:57:13 +00:00
|
|
|
|
Ogham Space Mark 4+2: (should align)
|
2013-05-27 10:08:37 +00:00
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Four-per-em space 4+2: (should align)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
2013-11-23 17:57:13 +00:00
|
|
|
|
Ogham Space Mark count 1: (should align)
|
|
|
|
|
Ogham Space Mark count 2: (should align)
|
|
|
|
|
Ogham Space Mark count 3: (should align)
|
|
|
|
|
Ogham Space Mark count 4: (should align)
|
|
|
|
|
Ogham Space Mark count 5: (should align)
|
|
|
|
|
Ogham Space Mark count 6: (should align)
|
|
|
|
|
Ogham Space Mark count 7: (should align)
|
|
|
|
|
Ogham Space Mark count 8: (should align)
|
|
|
|
|
Ogham Space Mark count 9: (should align)
|
|
|
|
|
Ogham Space Mark count A: (should align)
|
|
|
|
|
Ogham Space Mark count B: (should align)
|
|
|
|
|
Ogham Space Mark count C: (should align)
|
|
|
|
|
Ogham Space Mark count D: (should align)
|
|
|
|
|
Ogham Space Mark count E: (should align)
|
|
|
|
|
Ogham Space Mark count F: (should align)
|
2013-05-27 10:08:37 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2013-05-28 18:41:35 +00:00
|
|
|
|
|
2013-05-27 10:08:37 +00:00
|
|
|
|
/* */ /*
|
|
|
|
|
Hello from offset 6
|
|
|
|
|
Space 6+2: compare A
|
2013-11-23 17:57:13 +00:00
|
|
|
|
Ogham Space Mark 6+2: compare B
|
2013-05-27 10:08:37 +00:00
|
|
|
|
*/
|
2013-11-23 17:57:13 +00:00
|
|
|
|
/* */ /*
|
2013-05-27 10:08:37 +00:00
|
|
|
|
Hello from another offset 6 with wchars establishing column offset
|
|
|
|
|
Space 6+2: compare C
|
2013-11-23 17:57:13 +00:00
|
|
|
|
Ogham Space Mark 6+2: compare D
|
2013-05-27 10:08:37 +00:00
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2021-06-23 20:26:46 +00:00
|
|
|
|
// Taken from https://www.unicode.org/Public/UNIDATA/PropList.txt
|
2013-05-28 18:41:35 +00:00
|
|
|
|
let chars =
|
2015-03-06 21:57:44 +00:00
|
|
|
|
['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}',
|
|
|
|
|
'\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}',
|
|
|
|
|
'\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}',
|
|
|
|
|
'\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}',
|
|
|
|
|
'\u{205F}', '\u{3000}'];
|
2015-01-31 17:20:46 +00:00
|
|
|
|
for c in &chars {
|
2013-05-28 18:41:35 +00:00
|
|
|
|
let ws = c.is_whitespace();
|
2014-05-22 18:28:01 +00:00
|
|
|
|
println!("{} {}", c , ws);
|
2013-05-27 10:08:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|