-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Extremely sorry if this is actually part of the spec, but this doesn't seem quite right. With this code:
#[test]
fn it_works() {
use unicode_segmentation::UnicodeSegmentation;
let s = "ππ¦π¨βπ§βπ¦π©βπ§βπ¦";
println!("forwards:");
for cluster in s.graphemes(true) {
println!("{}", cluster);
}
println!("backwards:");
for cluster in s.graphemes(true).rev() {
println!("{}", cluster);
}
assert_eq!(s.graphemes(true).count(), s.graphemes(true).rev().count());
}
both with 1.0.1 and master, I get
running 1 test
test it_works ... FAILED
failures:
---- it_works stdout ----
forwards:
π
π¦
π¨βπ§βπ¦
π©βπ§βπ¦
backwards:
βπ¦
βπ§
π©
βπ¦
βπ§
π¨
π¦
π
thread 'it_works' panicked at 'assertion failed: `(left == right)` (left: `4`, right: `8`)', src/lib.rs:16
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Metadata
Metadata
Assignees
Labels
No labels