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

Function test_run_after_async_error_discards_old_program

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

Source from the content-addressed store, hash-verified

1056
1057 #[test]
1058 fn test_run_after_async_error_discards_old_program() {
1059 let program = r#"DIR "invalid:": PRINT "stale""#;
1060 Tester::default()
1061 .set_program(None, program)
1062 .continue_from_here()
1063 .run("RUN")
1064 .expect_clear()
1065 .expect_err("1:1: Drive 'INVALID' is not mounted")
1066 .expect_program(None as Option<String>, program)
1067 .check()
1068 .run(r#"PRINT "ok""#)
1069 .expect_clear()
1070 .expect_prints(["ok"])
1071 .expect_program(None as Option<String>, program)
1072 .check();
1073 }
1074
1075 #[test]
1076 fn test_run_does_not_leave_error_handler_active() {

Callers

nothing calls this directly

Calls 8

expect_programMethod · 0.80
expect_clearMethod · 0.80
continue_from_hereMethod · 0.80
set_programMethod · 0.80
checkMethod · 0.45
expect_printsMethod · 0.45
runMethod · 0.45
expect_errMethod · 0.45

Tested by

no test coverage detected