Skip to content

Commit

Permalink
test(clafrica): improve testing time
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonbrad committed Sep 15, 2023
1 parent 0a1873f commit 2f34e6f
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions clafrica/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,29 +252,19 @@ mod tests {
input!(KeyA KeyF, typing_speed_ms);
output!(textfield, format!("{LIMIT}uuɑ"));

(0..3).for_each(|_| {
input!(Backspace, typing_speed_ms);
});

// We verify the auto capitalization works as expected
input!(CapsLock KeyA CapsLock KeyF, typing_speed_ms);
input!(CapsLock KeyA CapsLock KeyF KeyF, typing_speed_ms);
input!(KeyA KeyF KeyF, typing_speed_ms);
output!(textfield, format!("{LIMIT}αⱭⱭɑɑ"));

(0..5).for_each(|_| {
input!(Backspace, typing_speed_ms);
});
output!(textfield, format!("{LIMIT}uuɑαⱭⱭɑɑ"));
input!(Escape, typing_speed_ms);

// We verify that the translation work as expected
input!(KeyH KeyE KeyL KeyL KeyO, typing_speed_ms);
output!(textfield, format!("{LIMIT}hi"));
output!(textfield, format!("{LIMIT}uuɑαⱭⱭɑɑhi"));
input!(Escape KeyH KeyI, typing_speed_ms);
output!(textfield, format!("{LIMIT}hihello"));

(0..7).for_each(|_| {
input!(Backspace, typing_speed_ms);
});
output!(textfield, format!("{LIMIT}uuɑαⱭⱭɑɑhihello"));
input!(Escape, typing_speed_ms);

// We verify that the predicate selection work as expected
input!(KeyH KeyE, typing_speed_ms);
Expand All @@ -287,6 +277,6 @@ mod tests {
rdev::simulate(&KeyPress(ControlLeft)).unwrap();
input!(ControlRight, typing_speed_ms);
rdev::simulate(&KeyRelease(ControlLeft)).unwrap();
output!(textfield, format!("{LIMIT}hi"));
output!(textfield, format!("{LIMIT}uuɑαⱭⱭɑɑhihellohi"));
}
}

0 comments on commit 2f34e6f

Please sign in to comment.