From 3bd9bc72a7be9a1861f5c228c18ac74ed783a9cd Mon Sep 17 00:00:00 2001 From: Ivan Date: Wed, 14 Oct 2026 19:22:14 +0300 Subject: [PATCH] Tests: monitor_macos answers nextest's --list monitor_macos is harness = false, so nothing answered cargo-nextest's discovery: `--list --format terse` ran the whole test and nextest failed to parse its output on macOS. List the one test, and nothing for `--ignored`, as mac_menu_appkit already does; `monitor_macos --exact` still runs the body. Co-Authored-By: Claude Opus 5.5 --- crates/tablet/tests/monitor_macos.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/tablet/tests/monitor_macos.rs b/crates/tablet/tests/monitor_macos.rs index 0a32923aa1..82f371cdb1 100644 --- a/crates/tablet/tests/monitor_macos.rs +++ b/crates/tablet/tests/monitor_macos.rs @@ -14,6 +14,16 @@ fn main() { use photocraft_tablet::Sample; use photocraft_tablet::macos::Monitor; + // Answer cargo-nextest's `--list` (and nothing for `--ignored`), as tests/mac_menu_appkit.rs + // in apps/photocraft does; `monitor_macos --exact` falls through to the test. + let args: Vec = std::env::args().collect(); + if args.iter().any(|a| a == "--list") { + if !args.iter().any(|a| a == "--ignored") { + println!("monitor_macos: test"); + } + return; + } + let mtm = MainThreadMarker::new().expect("harness = false runs on the main thread"); let app = NSApplication::sharedApplication(mtm); let event = |kind: CGEventType, pressure: f64, tilt: (f64, f64), subtype: CGEventMouseSubtype| {