]> git.lizzy.rs Git - rust.git/blob - tests/ui/unicode.rs
removing unsafe from test fn's && renaming shrink to sugg_span
[rust.git] / tests / ui / unicode.rs
1 #[warn(clippy::invisible_characters)]
2 fn zero() {
3     print!("Here >​< is a ZWS, and ​another");
4     print!("This\u{200B}is\u{200B}fine");
5     print!("Here >­< is a SHY, and ­another");
6     print!("This\u{ad}is\u{ad}fine");
7     print!("Here >⁠< is a WJ, and ⁠another");
8     print!("This\u{2060}is\u{2060}fine");
9 }
10
11 #[warn(clippy::unicode_not_nfc)]
12 fn canon() {
13     print!("̀àh?");
14     print!("a\u{0300}h?"); // also ok
15 }
16
17 #[warn(clippy::non_ascii_literal)]
18 fn uni() {
19     print!("Üben!");
20     print!("\u{DC}ben!"); // this is ok
21 }
22
23 // issue 8013
24 #[warn(clippy::non_ascii_literal)]
25 fn single_quote() {
26     const _EMPTY_BLOCK: char = '▱';
27     const _FULL_BLOCK: char = '▰';
28 }
29
30 fn main() {
31     zero();
32     uni();
33     canon();
34     single_quote();
35 }