Phase 6: Kompatibilitaetsabnahme abschliessen und archivieren

This commit is contained in:
2026-09-07 12:34:06 +02:00
parent 54ee427c1c
commit 993c3e7638
21 changed files with 752 additions and 58 deletions

View File

@@ -392,6 +392,33 @@ fn eof_leert_angenommene_eingaben_bei_modalen_und_modellosen_forms() {
}
}
#[test]
fn eof_im_dialog_eines_formularhandlers_beendet_die_ereignispumpe() {
use tb_vm::interp::PollResult;
let mut vm = vm("DIM SHARED s$\nForm1.Show\nSUB Form_MouseDown(Button AS INTEGER, Shift AS INTEGER, X AS SINGLE, Y AS SINGLE)\nSHARED s$\ns$ = \"vorher\"\nr% = MSGBOX(\"Speichern?\", 4)\ns$ = \"nachher\"\nEND SUB");
let mut host = CaptureHost::default();
assert_eq!(vm.run(&mut host), RunEvent::Ended);
host.ereignis(mouse());
for _ in 0..100 {
match vm.poll_visible_forms(&mut host, 32) {
PollResult::Event(RunEvent::Ended) => {
assert!(vm.rt.ende);
assert_eq!(string(&vm, "s"), "vorher");
assert!(tb_runtime::snapshot::text(&vm.rt.screen).contains("Speichern?"));
return;
}
PollResult::Waiting { deadline } => {
if let Some(event) = host.warten(deadline) {
vm.rt.ereignis(event);
}
}
PollResult::Yield => {}
other => panic!("unerwartetes Ergebnis: {other:?}"),
}
}
panic!("Dialog-EOF wurde als Yield verschluckt");
}
#[test]
fn review_menu_schliessen_stellt_pending_trap_vor_erneutem_warten_zu() {
struct MenuHost {