Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Arteiii committed Apr 17, 2024
1 parent bfb1798 commit 87107cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/menu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ fn handle_key_input_windows(buffer: &mut String, event: Event) -> bool {

#[cfg(test)]
mod tests {
use super::*;
use crossterm::event::{KeyEventKind, KeyEventState, KeyModifiers};

use super::*;

#[cfg(unix)]
#[test]
fn test_handle_key_input_unix_enter() {
Expand Down Expand Up @@ -121,6 +122,7 @@ mod tests {
assert_eq!(buffer, "a");
}

#[cfg(windows)]
#[test]
fn test_handle_key_input_windows_enter() {
let mut buffer = String::new();
Expand All @@ -133,6 +135,7 @@ mod tests {
assert!(handle_key_input_windows(&mut buffer, event));
}

#[cfg(windows)]
#[test]
fn test_handle_key_input_windows_backspace() {
let mut buffer = String::from("test");
Expand All @@ -146,6 +149,7 @@ mod tests {
assert_eq!(buffer, "tes");
}

#[cfg(windows)]
#[test]
fn test_handle_key_input_windows_char() {
let mut buffer = String::new();
Expand Down

0 comments on commit 87107cc

Please sign in to comment.