Fix handling of unicode in compare tests.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded

This commit is contained in:
Tom Alexander
2023-08-31 20:19:28 -04:00
parent ee92049e5d
commit 80d77ff5d6
4 changed files with 8 additions and 5 deletions

View File

@@ -1457,7 +1457,7 @@ fn compare_plain_text<'s>(
.as_atom()?
.parse()?;
let emacs_text_length = end_ind - start_ind;
if rust_source.len() != emacs_text_length {
if rust_source.chars().count() != emacs_text_length {
this_status = DiffStatus::Bad;
message = Some(format!(
"(emacs len != rust len) {:?} != {:?}",