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

Function test_run_does_not_leave_error_handler_active

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

Source from the content-addressed store, hash-verified

1074
1075 #[test]
1076 fn test_run_does_not_leave_error_handler_active() {
1077 let program = r#"
1078 ON ERROR GOTO @handler
1079 END
1080
1081 @handler
1082 PRINT "captured: "; ERRMSG
1083 END 1
1084 "#;
1085 Tester::default()
1086 .set_program(None, program)
1087 .continue_from_here()
1088 .run("RUN")
1089 .expect_clear()
1090 .expect_program(None as Option<String>, program)
1091 .check()
1092 .run(r#"LOAD "missing-file""#)
1093 .expect_clear()
1094 .expect_err("1:1: Entry not found")
1095 .expect_program(None as Option<String>, program)
1096 .check();
1097 }
1098
1099 #[test]
1100 fn test_run_preserves_errmsg_across_commands() {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected