feat: export clips, protect bookmarks and clean session storage
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//! Validation helper: exits after both native global actions arrive.
|
||||
use std::{sync::mpsc, time::Duration};
|
||||
fn main() {
|
||||
let (sender, receiver) = mpsc::channel();
|
||||
let _hotkeys = clipbin_core::hotkeys::start(
|
||||
9,
|
||||
10,
|
||||
move |action, _| {
|
||||
sender.send(action).unwrap();
|
||||
},
|
||||
|status| println!("hotkeys={status}"),
|
||||
);
|
||||
let first = receiver
|
||||
.recv_timeout(Duration::from_secs(20))
|
||||
.expect("first action");
|
||||
let second = receiver
|
||||
.recv_timeout(Duration::from_secs(20))
|
||||
.expect("second action");
|
||||
assert!(matches!(
|
||||
(first, second),
|
||||
(
|
||||
clipbin_core::hotkeys::Action::Clip,
|
||||
clipbin_core::hotkeys::Action::Bookmark
|
||||
)
|
||||
));
|
||||
println!("PASS native clip and bookmark hotkeys");
|
||||
}
|
||||
Reference in New Issue
Block a user