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

Function test_run_something_that_exits_with_trailing_code

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

Source from the content-addressed store, hash-verified

980
981 #[test]
982 fn test_run_something_that_exits_with_trailing_code() {
983 // TODO(jmmv): Versions of EndBASIC before the core rewrite would show the "after"
984 // message after an abrupt termination from the program. core cannot do this because
985 // of how the whole line is compiled first and how RUN then replaces the full program
986 // memory. We should fix this at some point.
987 let program = "PRINT 5: END 1: PRINT 4";
988 Tester::default()
989 .set_program(Some("untouched.bas"), program)
990 .run(r#"RUN: PRINT "after""#)
991 .expect_clear()
992 .expect_prints([" 5", "Program exited with code 1"])
993 .expect_program(Some("untouched.bas"), program)
994 .check();
995 }
996
997 #[test]
998 fn test_run_after_break_starts_from_beginning() {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected