From 3464fb0c58a2586b2ad84bc61302a28b9e83ef77 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 5 Nov 2026 13:50:25 -0800 Subject: [PATCH] test(transport): the listener tests run on Windows too, against the uds_windows listener the Windows daemon uses --- crates/komorebi-transport/src/listener.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/komorebi-transport/src/listener.rs b/crates/komorebi-transport/src/listener.rs index cb17b1a2..ddb28917 100644 --- a/crates/komorebi-transport/src/listener.rs +++ b/crates/komorebi-transport/src/listener.rs @@ -254,13 +254,21 @@ impl CommandListener for uds_windows::UnixListener { } } -#[cfg(all(test, unix))] +/// The tests run against the listener each platform really uses: the Unix domain sockets of the OS +/// on Unix, and the `uds_windows` ones (AF_UNIX on Windows) that the Windows daemon listens on +#[cfg(all(test, any(unix, windows)))] mod tests { use super::*; use parking_lot::Mutex; + #[cfg(unix)] use std::os::unix::net::UnixListener; + #[cfg(unix)] use std::os::unix::net::UnixStream; use std::sync::Arc; + #[cfg(windows)] + use uds_windows::UnixListener; + #[cfg(windows)] + use uds_windows::UnixStream; /// A window manager that records what it is asked, and answers each message with its name struct Recorder {