This commit is contained in:
Brandon Thomas committed 2022-02-06 21:16:21 -05:00
1 parent 4e9919f5a2
commit 2cc117b04f
1 file changed
+7 -1
+7 -1
View File
@@ -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());