]> git.proxmox.com Git - rustc.git/blame - src/test/pretty/block-comment-wchar.pp
Imported Upstream version 1.1.0+dfsg1
[rustc.git] / src / test / pretty / block-comment-wchar.pp
CommitLineData
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
LB
16// pp-exact:block-comment-wchar.pp
17fn f() {
18 fn nested() {
19 /*
20 Spaced2
21 */
22 /*
23 Spaced10
24 */
25 /*
26 Tabbed8+2
27 */
28 /*
29 CR8+2
30 */
31 }
32 /*
33 Spaced2: (prefixed so start of space aligns with comment)
34 */
35 /*
36 Tabbed2: (more indented b/c *start* of space will align with comment)
37 */
38 /*
39 Spaced6: (Alignment removed and realigning spaces inserted)
40 */
41 /*
42 Tabbed4+2: (Alignment removed and realigning spaces inserted)
43 */
44
45 /*
46 VT4+2: (should align)
47 */
48 /*
49 FF4+2: (should align)
50 */
51 /*
52 CR4+2: (should align)
53 */
54 /*
1a4d82fc 55 NEL4+2: (should align)
970d7e83
LB
56 */
57 /*
58 Ogham Space Mark 4+2: (should align)
59 */
60 /*
1a4d82fc 61 Ogham Space Mark 4+2: (should align)
970d7e83
LB
62 */
63 /*
64 Four-per-em space 4+2: (should align)
65 */
66
67 /*
1a4d82fc
JJ
68 Ogham Space Mark count 1: (should align)
69 Ogham Space Mark count 2: (should align)
70 Ogham Space Mark count 3: (should align)
71 Ogham Space Mark count 4: (should align)
72 Ogham Space Mark count 5: (should align)
73 Ogham Space Mark count 6: (should align)
74 Ogham Space Mark count 7: (should align)
75 Ogham Space Mark count 8: (should align)
76 Ogham Space Mark count 9: (should align)
77 Ogham Space Mark count A: (should align)
78 Ogham Space Mark count B: (should align)
79 Ogham Space Mark count C: (should align)
80 Ogham Space Mark count D: (should align)
81 Ogham Space Mark count E: (should align)
82 Ogham Space Mark count F: (should align)
970d7e83
LB
83 */
84
85
86
87 /* */
88
89 /*
90 Hello from offset 6
91 Space 6+2: compare A
1a4d82fc 92 Ogham Space Mark 6+2: compare B
970d7e83
LB
93 */
94
1a4d82fc 95 /* */
970d7e83
LB
96
97 /*
98 Hello from another offset 6 with wchars establishing column offset
99 Space 6+2: compare C
1a4d82fc 100 Ogham Space Mark 6+2: compare D
970d7e83
LB
101 */
102}
103
104fn main() {
1a4d82fc 105 // Taken from http://www.unicode.org/Public/UNIDATA/PropList.txt
970d7e83 106 let chars =
c34b1796
AL
107 ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}',
108 '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}',
109 '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}',
110 '\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}',
111 '\u{205F}', '\u{3000}'];
85aaf69f 112 for c in &chars {
970d7e83 113 let ws = c.is_whitespace();
1a4d82fc 114 println!("{} {}" , c , ws);
970d7e83
LB
115 }
116}