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

Function test_autoexec_execution_error_is_ignored

repl/src/lib.rs:403–414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401
402 #[test]
403 fn test_autoexec_execution_error_is_ignored() {
404 let autoexec = "a = 1\nb = 3 >> -1: c = 2";
405 let tester = Tester::default().write_file("AUTOEXEC.BAS", autoexec);
406 let (console, storage) = (tester.get_console(), tester.get_storage());
407 let mut continuation = tester.continue_from_here();
408 block_on(try_load_autoexec(continuation.get_machine(), console, storage)).unwrap();
409 continuation
410 .run("after = 5")
411 .expect_prints(["AUTOEXEC.BAS failed: 2:7: Number of bits to >> (-1) must be positive"])
412 .expect_file("MEMORY:/AUTOEXEC.BAS", autoexec)
413 .check();
414 }
415
416 #[test]
417 fn test_autoexec_name_is_case_sensitive() {

Callers

nothing calls this directly

Calls 10

try_load_autoexecFunction · 0.85
write_fileMethod · 0.80
continue_from_hereMethod · 0.80
get_machineMethod · 0.80
get_consoleMethod · 0.45
get_storageMethod · 0.45
checkMethod · 0.45
expect_fileMethod · 0.45
expect_printsMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected