Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions crates/glass-testapp/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,26 @@ fn crop_extracts_region_of_real_capture() {
p.stop_app().unwrap();
}

#[test]
#[ignore = "requires an X server; run via scripts/test-x11.sh"]
fn app_exit_during_window_discovery_reports_the_exit_status() {
use glass_core::GlassError;

let xvfb = Xvfb::start();
let mut p = X11Platform::connect(Some(&xvfb.display)).unwrap();
let spec = AppSpec {
run: vec!["true".to_string()],
timeout_ms: 5000,
..app_spec()
};

let err = p.start_app(&spec).unwrap_err();
assert!(
matches!(err, GlassError::AppExited(Some(0))),
"expected the child's exit status, got {err}"
);
}

#[test]
#[ignore = "requires an X server; run via scripts/test-x11.sh"]
fn failed_start_kills_the_child_process() {
Expand Down