()
| 755 | |
| 756 | #[test] |
| 757 | fn test_inkey_ok() { |
| 758 | Tester::default().run("result = INKEY").expect_var("result", "").check(); |
| 759 | |
| 760 | Tester::default() |
| 761 | .add_input_chars("x") |
| 762 | .run("result = INKEY") |
| 763 | .expect_var("result", "x") |
| 764 | .check(); |
| 765 | |
| 766 | Tester::default() |
| 767 | .add_input_keys(&[Key::CarriageReturn, Key::Backspace, Key::NewLine]) |
| 768 | .run( |
| 769 | r#" |
| 770 | r1 = INKEY$ |
| 771 | r2 = INKEY |
| 772 | r3 = INKEY$ |
| 773 | "#, |
| 774 | ) |
| 775 | .expect_var("r1", "ENTER") |
| 776 | .expect_var("r2", "BS") |
| 777 | .expect_var("r3", "ENTER") |
| 778 | .check(); |
| 779 | } |
| 780 | |
| 781 | #[test] |
| 782 | fn test_inkey_errors() { |
nothing calls this directly
no test coverage detected