From 2cc117b04fa3fc19902646a491c828b1a17c45ad Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sun, 6 Feb 2022 21:16:21 -0500 Subject: [PATCH] tests --- crates/lib/tts_common/src/clean_symbols.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/lib/tts_common/src/clean_symbols.rs b/crates/lib/tts_common/src/clean_symbols.rs index 205fda41d5..598250a6d6 100644 --- a/crates/lib/tts_common/src/clean_symbols.rs +++ b/crates/lib/tts_common/src/clean_symbols.rs @@ -130,6 +130,12 @@ mod tests { assert_eq!(clean_symbols("test…"), "test...".to_string()); } + #[test] + fn symbol_expansion() { + assert_eq!(clean_symbols("Pokémon™ is a popular video game series"), + "Pokemon trademark is a popular video game series".to_string()); // NB: Extra space + } + #[test] fn filters_latin_characters() { assert_eq!(clean_symbols("pokémon"), "pokemon".to_string()); @@ -171,7 +177,7 @@ mod tests { assert_eq!(clean_symbols("ó"), "o".to_string()); assert_eq!(clean_symbols("é"), "e".to_string()); assert_eq!(clean_symbols("ñ"), "n".to_string()); - assert_eq!(clean_symbols("ú"), "ú".to_string()); + assert_eq!(clean_symbols("ú"), "u".to_string()); assert_eq!(clean_symbols("ı"), "i".to_string()); // Dotless i assert_eq!(clean_symbols("ü"), "u".to_string()); assert_eq!(clean_symbols("¿"), "?".to_string());