()
| 818 | |
| 819 | #[test] |
| 820 | fn test_input_on_predefined_vars() { |
| 821 | Tester::default() |
| 822 | .add_input_chars("1.5\n") |
| 823 | .run("DIM d AS DOUBLE: d = 3.0: INPUT ; d") |
| 824 | .expect_var("d", 1.5) |
| 825 | .check(); |
| 826 | |
| 827 | Tester::default() |
| 828 | .add_input_chars("foo bar\n") |
| 829 | .run("DIM s AS STRING: INPUT ; s") |
| 830 | .expect_var("s", "foo bar") |
| 831 | .check(); |
| 832 | |
| 833 | Tester::default() |
| 834 | .add_input_chars("5\ntrue\n") |
| 835 | .run("DIM b AS BOOLEAN: INPUT ; b") |
| 836 | .expect_prints(["Retry input: Invalid boolean literal 5"]) |
| 837 | .expect_var("b", true) |
| 838 | .check(); |
| 839 | } |
| 840 | |
| 841 | #[test] |
| 842 | fn test_input_retry() { |
nothing calls this directly
no test coverage detected