]> git.proxmox.com Git - rustc.git/blame - src/test/pretty/block-comment-wchar.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / pretty / block-comment-wchar.rs
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 16// pp-exact:block-comment-wchar.pp
1a4d82fc 17// ignore-lexer-test FIXME #15679
970d7e83
LB
18fn f() {
19 fn nested() {
20 /*
21 Spaced2
22 */
23 /*
24 Spaced10
25 */
26 /*
27 Tabbed8+2
28 */
29 /*
30\r\r\r\r\r\r\r\r 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\v\v\v\v VT4+2: (should align)
48 */
49 /*
50\f\f\f\f FF4+2: (should align)
51 */
52 /*
53\r\r\r\r CR4+2: (should align)
54 */
55 /*
1a4d82fc 56\85\85\85\85 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 Hello from offset 6
89 Space 6+2: compare A
1a4d82fc 90       Ogham Space Mark 6+2: compare B
970d7e83 91 */
1a4d82fc 92/* */ /*
970d7e83
LB
93 Hello from another offset 6 with wchars establishing column offset
94 Space 6+2: compare C
1a4d82fc 95       Ogham Space Mark 6+2: compare D
970d7e83
LB
96 */
97}
98
99fn main() {
1a4d82fc 100 // Taken from http://www.unicode.org/Public/UNIDATA/PropList.txt
970d7e83 101 let chars =
c34b1796
AL
102 ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', '\u{85}', '\u{A0}',
103 '\u{1680}', '\u{2000}', '\u{2001}', '\u{2002}', '\u{2003}',
104 '\u{2004}', '\u{2005}', '\u{2006}', '\u{2007}', '\u{2008}',
105 '\u{2009}', '\u{200A}', '\u{2028}', '\u{2029}', '\u{202F}',
106 '\u{205F}', '\u{3000}'];
85aaf69f 107 for c in &chars {
970d7e83 108 let ws = c.is_whitespace();
1a4d82fc 109 println!("{} {}", c , ws);
970d7e83
LB
110 }
111}