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

Function test_run_preserves_errmsg_across_commands

std/src/program.rs:1100–1114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1098
1099 #[test]
1100 fn test_run_preserves_errmsg_across_commands() {
1101 let program = r#"ON ERROR RESUME NEXT: COLOR -1: END"#;
1102 Tester::default()
1103 .set_program(None, program)
1104 .continue_from_here()
1105 .run("RUN")
1106 .expect_clear()
1107 .expect_program(None as Option<String>, program)
1108 .check()
1109 .run("result = ERRMSG")
1110 .expect_clear()
1111 .expect_var("result", "1:29: Color out of range")
1112 .expect_program(None as Option<String>, program)
1113 .check();
1114 }
1115
1116 #[test]
1117 fn test_run_after_break_discards_old_program() {

Callers

nothing calls this directly

Calls 7

expect_programMethod · 0.80
expect_varMethod · 0.80
expect_clearMethod · 0.80
continue_from_hereMethod · 0.80
set_programMethod · 0.80
checkMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected