]>
Commit | Line | Data |
---|---|---|
1a4d82fc | 1 | // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT |
970d7e83 LB |
2 | // file at the top-level directory of this distribution and at |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | // This is meant as a test case for Issue 3961. | |
12 | // | |
13 | // Test via: rustc --pretty normal src/test/pretty/block-comment-wchar.rs | |
1a4d82fc JJ |
14 | // ignore-tidy-cr |
15 | // ignore-tidy-tab | |
970d7e83 | 16 | // pp-exact:block-comment-wchar.pp |
1a4d82fc | 17 | // ignore-lexer-test FIXME #15679 |
970d7e83 LB |
18 | fn f() { |
19 | fn nested() { | |
20 | /* | |
21 | Spaced2 | |
22 | */ | |
23 | /* | |
24 | Spaced10 | |
25 | */ | |
26 | /* | |
27 | Tabbed8+2 | |
28 | */ | |
29 | /* | |
30 | CR8+2 | |
31 | */ | |
32 | } | |
33 | /* | |
34 | Spaced2: (prefixed so start of space aligns with comment) | |
35 | */ | |
36 | /* | |
37 | Tabbed2: (more indented b/c *start* of space will align with comment) | |
38 | */ | |
39 | /* | |
40 | Spaced6: (Alignment removed and realigning spaces inserted) | |
41 | */ | |
42 | /* | |
43 | Tabbed4+2: (Alignment removed and realigning spaces inserted) | |
44 | */ | |
45 | ||
46 | /* | |
47 | VT4+2: (should align) | |
48 | */ | |
49 | /* | |
50 | FF4+2: (should align) | |
51 | */ | |
52 | /* | |
53 | CR4+2: (should align) | |
54 | */ | |
55 | /* | |
1a4d82fc | 56 | NEL4+2: (should align) |
970d7e83 LB |
57 | */ |
58 | /* | |
59 | Ogham Space Mark 4+2: (should align) | |
60 | */ | |
61 | /* | |
1a4d82fc | 62 | Ogham Space Mark 4+2: (should align) |
970d7e83 LB |
63 | */ |
64 | /* | |
65 | Four-per-em space 4+2: (should align) | |
66 | */ | |
67 | ||
68 | /* | |
1a4d82fc JJ |
69 | Ogham Space Mark count 1: (should align) |
70 | Ogham Space Mark count 2: (should align) | |
71 | Ogham Space Mark count 3: (should align) | |
72 | Ogham Space Mark count 4: (should align) | |
73 | Ogham Space Mark count 5: (should align) | |
74 | Ogham Space Mark count 6: (should align) | |
75 | Ogham Space Mark count 7: (should align) | |
76 | Ogham Space Mark count 8: (should align) | |
77 | Ogham Space Mark count 9: (should align) | |
78 | Ogham Space Mark count A: (should align) | |
79 | Ogham Space Mark count B: (should align) | |
80 | Ogham Space Mark count C: (should align) | |
81 | Ogham Space Mark count D: (should align) | |
82 | Ogham Space Mark count E: (should align) | |
83 | Ogham Space Mark count F: (should align) | |
970d7e83 LB |
84 | */ |
85 | ||
86 | ||
87 | ||
88 | /* */ | |
89 | ||
90 | /* | |
91 | Hello from offset 6 | |
92 | Space 6+2: compare A | |
1a4d82fc | 93 | Ogham Space Mark 6+2: compare B |
970d7e83 LB |
94 | */ |
95 | ||
1a4d82fc | 96 | /* */ |
970d7e83 LB |
97 | |
98 | /* | |
99 | Hello from another offset 6 with wchars establishing column offset | |
100 | Space 6+2: compare C | |
1a4d82fc | 101 | Ogham Space Mark 6+2: compare D |
970d7e83 LB |
102 | */ |
103 | } | |
104 | ||
105 | fn main() { | |
1a4d82fc | 106 | // Taken from http://www.unicode.org/Public/UNIDATA/PropList.txt |
970d7e83 | 107 | let chars = |
c34b1796 AL |
108 | ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}', |
109 | '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}', | |
110 | '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}', | |
111 | '\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}', | |
112 | '\u{205F}', '\u{3000}']; | |
85aaf69f | 113 | for c in &chars { |
970d7e83 | 114 | let ws = c.is_whitespace(); |
1a4d82fc | 115 | println!("{} {}" , c , ws); |
970d7e83 LB |
116 | } |
117 | } |