clipboard/clipboard.rs
1use jabba_lib::jclipboard;
2
3fn main() {
4 jclipboard::check();
5
6 for &text in &["", "a", "aa", "hello", "world", "rust", "Éva"] {
7 jclipboard::set_text(text).unwrap();
8 println!("The text {:?} was pasted on the clipboard", text);
9
10 let read = jclipboard::get_text().unwrap();
11 println!("Contents of the clipboard: {:?}", read);
12 assert_eq!(read, text);
13 println!("---");
14 }
15}