8000 Add one test function (it's a start) · unicode-rs/rust-caseless@8b9e2a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b9e2a9

Browse files
Rob SpeerSimonSapin
Rob Speer
authored andcommitted
Add one test function (it's a start)
1 parent 27ceca4 commit 8b9e2a9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,17 @@ impl<I> Iterator for CaseFold<I> where I: Iterator<Item = char> {
113113
high.and_then(|h| h.checked_mul(3)).and_then(|h| h.checked_add(queue_len)))
114114
}
115115
}
116+
117+
#[cfg(test)]
118+
mod tests {
119+
use super::default_case_fold_str;
120+
121+
#[test]
122+
fn test_strs() {
123+
assert_eq!(default_case_fold_str("Test Case"), "test case");
124+
assert_eq!(default_case_fold_str("Teſt Caſe"), "test case");
125+
assert_eq!(default_case_fold_str("spiffiest"), "spiffiest");
126+
assert_eq!(default_case_fold_str("straße"), "strasse");
127+
}
128+
}
129+

0 commit comments

Comments
 (0)
0