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 <noreply@anthropic.com>
This commit is contained in:
Ivan
2026-10-14 19:22:14 +03:00
co-authored by Claude Opus 5.5
parent b23a01aa8f
commit 3bd9bc72a7
+10
View File
@@ -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<String> = 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| {