thing-tui: pin tolerate and the meta modifiers
All checks were successful
Portable Eve contracts and browser lowering / ubuntu-latest eve-browser-lowering (pull_request) Successful in 2m25s
Portable Eve contracts and browser lowering / ubuntu-latest eve-contracts (pull_request) Successful in 2m38s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-29 01:56:14 +01:00
commit 482fdd42cf
2 changed files with 12 additions and 1 deletions

View file

@ -156,7 +156,9 @@ fn chain_panic_hook(first: impl Fn() + Send + Sync + 'static) {
mod tests {
use std::sync::Mutex;
use super::chain_panic_hook;
use std::io;
use super::{chain_panic_hook, tolerate};
static ORDER: Mutex<Vec<&'static str>> = Mutex::new(Vec::new());
@ -171,4 +173,12 @@ mod tests {
assert!(caught.is_err());
assert_eq!(*ORDER.lock().unwrap(), ["restore", "previous"]);
}
#[test]
fn only_an_unsupported_mode_is_tolerated() {
assert!(tolerate(Ok(())).is_ok());
assert!(tolerate(Err(io::Error::from(io::ErrorKind::Unsupported))).is_ok());
let other = tolerate(Err(io::Error::from(io::ErrorKind::BrokenPipe))).unwrap_err();
assert_eq!(other.kind(), io::ErrorKind::BrokenPipe);
}
}

View file

@ -123,6 +123,7 @@ fn modifiers_are_carried_each_on_its_own() {
(KeyModifiers::ALT, Modifiers { alt: true, ..NONE }),
(KeyModifiers::SUPER, Modifiers { meta: true, ..NONE }),
(KeyModifiers::META, Modifiers { meta: true, ..NONE }),
(KeyModifiers::SUPER | KeyModifiers::META, Modifiers { meta: true, ..NONE }),
(KeyModifiers::HYPER, NONE),
] {
let events = translate(&key(KeyCode::Down, flag, KeyEventKind::Press));