MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_input_on_predefined_vars

Function test_input_on_predefined_vars

std/src/console/cmds.rs:820–839  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 5

expect_varMethod · 0.80
checkMethod · 0.45
runMethod · 0.45
add_input_charsMethod · 0.45
expect_printsMethod · 0.45

Tested by

no test coverage detected