diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-07 00:07:24 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-07 16:29:44 +0300 |
| commit | 3c2b46d24aa6c8011a1e198143752f2aa414d585 (patch) | |
| tree | a52280bccc824ca656f8bc986a756f30901974e4 /src/app/input | |
| parent | 5d7e56737ef30d9de5802b0684a9428c40131dda (diff) | |
feat: add native windows beta support
Diffstat (limited to 'src/app/input')
| -rw-r--r-- | src/app/input/mod.rs | 1 | ||||
| -rw-r--r-- | src/app/input/mouse.rs | 1 | ||||
| -rw-r--r-- | src/app/input/navigate.rs | 8 | ||||
| -rw-r--r-- | src/app/input/terminal.rs | 9 |
4 files changed, 15 insertions, 4 deletions
diff --git a/src/app/input/mod.rs b/src/app/input/mod.rs index e8761a35..59fa1ccd 100644 --- a/src/app/input/mod.rs +++ b/src/app/input/mod.rs @@ -526,6 +526,7 @@ fn unique_temp_path(name: &str) -> std::path::PathBuf { } #[cfg(test)] +#[cfg(unix)] fn wait_for_file(path: &std::path::Path) -> String { let deadline = std::time::Instant::now() + std::time::Duration::from_secs(2); while std::time::Instant::now() < deadline { diff --git a/src/app/input/mouse.rs b/src/app/input/mouse.rs index ae10c0fa..e69bb2c1 100644 --- a/src/app/input/mouse.rs +++ b/src/app/input/mouse.rs @@ -2519,6 +2519,7 @@ mod tests { assert_eq!(app.state.workspaces[0].display_name(), "a"); } + #[cfg(unix)] #[tokio::test] async fn keyboard_context_menu_split_keeps_new_runtime() { let mut app = app_for_mouse_test(); diff --git a/src/app/input/navigate.rs b/src/app/input/navigate.rs index 8dacc5c9..9d861f66 100644 --- a/src/app/input/navigate.rs +++ b/src/app/input/navigate.rs @@ -988,12 +988,15 @@ fn shell_quote(value: &str) -> String { #[cfg(test)] mod tests { + #[cfg(unix)] use std::time::Duration; use crossterm::event::{KeyCode, KeyEvent, KeyModifiers}; use ratatui::layout::Direction; - use super::super::{state_with_workspaces, unique_temp_path, wait_for_file}; + #[cfg(unix)] + use super::super::wait_for_file; + use super::super::{state_with_workspaces, unique_temp_path}; use super::*; use crate::{ app::App, config::Config, input::TerminalKey, terminal::TerminalState, workspace::Workspace, @@ -1897,6 +1900,7 @@ last_pane = "prefix+tab" assert_eq!(state.workspaces.len(), 2); } + #[cfg(unix)] #[tokio::test] async fn custom_command_runs_from_prefix_key_in_navigate_mode() { let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel(); @@ -1946,6 +1950,7 @@ last_pane = "prefix+tab" let _ = std::fs::remove_file(output_path); } + #[cfg(unix)] #[tokio::test] async fn pane_overlay_command_opens_and_closes_after_exit() { let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel(); @@ -2033,6 +2038,7 @@ last_pane = "prefix+tab" } } + #[cfg(unix)] #[tokio::test] async fn edit_scrollback_key_opens_focused_runtime_scrollback_in_editor_pane() { let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel(); diff --git a/src/app/input/terminal.rs b/src/app/input/terminal.rs index c60a9f48..60f2d4cc 100644 --- a/src/app/input/terminal.rs +++ b/src/app/input/terminal.rs @@ -197,9 +197,9 @@ mod tests { use crossterm::event::{KeyCode, KeyEventKind, KeyModifiers, MouseButton, MouseEventKind}; use ratatui::layout::Rect; - use super::super::{ - app_for_mouse_test, mouse, numbered_lines_bytes, unique_temp_path, wait_for_file, - }; + use super::super::{app_for_mouse_test, mouse, numbered_lines_bytes}; + #[cfg(unix)] + use super::super::{unique_temp_path, wait_for_file}; use super::*; use crate::{config::Config, events::AppEvent, workspace::Workspace}; @@ -738,6 +738,7 @@ mod tests { assert_eq!(app.state.mode, Mode::Terminal); } + #[cfg(unix)] #[tokio::test] async fn terminal_direct_edit_scrollback_opens_editor_pane() { let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel(); @@ -791,6 +792,7 @@ mod tests { let _ = std::fs::remove_file(output_path); } + #[cfg(unix)] #[tokio::test] async fn direct_custom_command_runs_before_forwarding_to_pane() { let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel(); @@ -827,6 +829,7 @@ mod tests { let _ = std::fs::remove_file(output_path); } + #[cfg(unix)] #[tokio::test] async fn direct_custom_pane_command_opens_overlay_pane() { let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel(); |
