]> git.proxmox.com Git - rustc.git/blob - src/test/pretty/block-comment-wchar.pp
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / pretty / block-comment-wchar.pp
1 // This is meant as a test case for Issue 3961.
2 //
3 // Test via: rustc -Zunpretty normal src/test/pretty/block-comment-wchar.rs
4 // ignore-tidy-cr
5 // ignore-tidy-tab
6 // pp-exact:block-comment-wchar.pp
7 fn f() {
8 fn nested() {
9 /*
10 Spaced2
11 */
12 /*
13 Spaced10
14 */
15 /*
16 Tabbed8+2
17 */
18 /*
19 CR8+2
20 */
21 }
22 /*
23 Spaced2: (prefixed so start of space aligns with comment)
24 */
25 /*
26 Tabbed2: (more indented b/c *start* of space will align with comment)
27 */
28 /*
29 Spaced6: (Alignment removed and realigning spaces inserted)
30 */
31 /*
32 Tabbed4+2: (Alignment removed and realigning spaces inserted)
33 */
34
35 /*
36 VT4+2: (should align)
37 */
38 /*
39 FF4+2: (should align)
40 */
41 /*
42 CR4+2: (should align)
43 */
44 /*
45 NEL4+2: (should align)
46 */
47 /*
48 Ogham Space Mark 4+2: (should align)
49 */
50 /*
51 Ogham Space Mark 4+2: (should align)
52 */
53 /*
54 Four-per-em space 4+2: (should align)
55 */
56
57 /*
58 Ogham Space Mark count 1: (should align)
59 Ogham Space Mark count 2: (should align)
60 Ogham Space Mark count 3: (should align)
61 Ogham Space Mark count 4: (should align)
62 Ogham Space Mark count 5: (should align)
63 Ogham Space Mark count 6: (should align)
64 Ogham Space Mark count 7: (should align)
65 Ogham Space Mark count 8: (should align)
66 Ogham Space Mark count 9: (should align)
67 Ogham Space Mark count A: (should align)
68 Ogham Space Mark count B: (should align)
69 Ogham Space Mark count C: (should align)
70 Ogham Space Mark count D: (should align)
71 Ogham Space Mark count E: (should align)
72 Ogham Space Mark count F: (should align)
73 */
74
75
76 /* */
77
78 /*
79 Hello from offset 6
80 Space 6+2: compare A
81 Ogham Space Mark 6+2: compare B
82 */
83 /* */
84
85 /*
86 Hello from another offset 6 with wchars establishing column offset
87 Space 6+2: compare C
88 Ogham Space Mark 6+2: compare D
89 */
90 }
91
92 fn main() {
93 // Taken from https://www.unicode.org/Public/UNIDATA/PropList.txt
94 let chars =
95 ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}',
96 '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}',
97 '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}',
98 '\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}',
99 '\u{205F}', '\u{3000}'];
100 for c in &chars { let ws = c.is_whitespace(); println!("{} {}", c, ws); }
101 }