()
| 871 | |
| 872 | #[test] |
| 873 | fn test_input_errors() { |
| 874 | check_stmt_compilation_err("1:1: INPUT expected <vref> | <[prompt$] <,|;> vref>", "INPUT"); |
| 875 | check_stmt_compilation_err( |
| 876 | "1:1: INPUT expected <vref> | <[prompt$] <,|;> vref>", |
| 877 | "INPUT ; ,", |
| 878 | ); |
| 879 | check_stmt_compilation_err( |
| 880 | "1:1: INPUT expected <vref> | <[prompt$] <,|;> vref>", |
| 881 | "INPUT ;", |
| 882 | ); |
| 883 | check_stmt_compilation_err("1:7: Expected STRING but found INTEGER", "INPUT 3 ; a"); |
| 884 | check_stmt_compilation_err( |
| 885 | "1:13: INPUT expected <vref> | <[prompt$] <,|;> vref>", |
| 886 | "INPUT \"foo\" AS bar", |
| 887 | ); |
| 888 | check_stmt_err("1:7: Undefined symbol a", "INPUT a + 1 ; b"); |
| 889 | Tester::default() |
| 890 | .run("a = 3: INPUT ; a + 1") |
| 891 | .expect_compilation_err("1:16: INPUT expected <vref> | <[prompt$] <,|;> vref>") |
| 892 | .check(); |
| 893 | check_stmt_err("1:11: Cannot + STRING and BOOLEAN", "INPUT \"a\" + TRUE; b?"); |
| 894 | } |
| 895 | |
| 896 | #[test] |
| 897 | fn test_input_propagates_interrupt_as_break() { |
nothing calls this directly
no test coverage detected