diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/parser/utf8_idents-rpass.rs | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/parser/utf8_idents-rpass.rs')
-rw-r--r-- | tests/ui/parser/utf8_idents-rpass.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/ui/parser/utf8_idents-rpass.rs b/tests/ui/parser/utf8_idents-rpass.rs new file mode 100644 index 000000000..206744a58 --- /dev/null +++ b/tests/ui/parser/utf8_idents-rpass.rs @@ -0,0 +1,39 @@ +// run-pass +// +#![allow(non_snake_case)] + +pub fn main() { + let ε = 0.00001f64; + let Π = 3.14f64; + let लंच = Π * Π + 1.54; + assert!(((लंच - 1.54) - (Π * Π)).abs() < ε); + assert_eq!(საჭმელად_გემრიელი_სადილი(), 0); +} + +fn საჭმელად_გემრიელი_სადილი() -> isize { + + // Lunch in several languages. + + let ランチ = 10; + let 午餐 = 10; + + let ארוחת_צהריי = 10; + let غداء = 10_usize; + let լանչ = 10; + let обед = 10; + let абед = 10; + let μεσημεριανό = 10; + let hádegismatur = 10; + let ручек = 10; + + let ăn_trưa = 10; + let อาหารกลางวัน = 10; + + // Lunchy arithmetic, mm. + + assert_eq!(hádegismatur * ручек * обед, 1000); + assert_eq!(10, ארוחת_צהריי); + assert_eq!(ランチ + 午餐 + μεσημεριανό, 30); + assert_eq!(ăn_trưa + อาหารกลางวัน, 20); + return (абед + լանչ) >> غداء; +} |