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

Function test_autoexec_compilation_error_is_ignored

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

Source from the content-addressed store, hash-verified

386
387 #[test]
388 fn test_autoexec_compilation_error_is_ignored() {
389 let autoexec = "a = 1\nb = undef: c = 2";
390 let tester = Tester::default().write_file("AUTOEXEC.BAS", autoexec);
391 let (console, storage) = (tester.get_console(), tester.get_storage());
392 let mut continuation = tester.continue_from_here();
393 block_on(try_load_autoexec(continuation.get_machine(), console, storage)).unwrap();
394 continuation
395 .run("after = 5")
396 .expect_var("after", 5)
397 .expect_prints(["AUTOEXEC.BAS failed: 2:5: Undefined symbol undef"])
398 .expect_file("MEMORY:/AUTOEXEC.BAS", autoexec)
399 .check();
400 }
401
402 #[test]
403 fn test_autoexec_execution_error_is_ignored() {

Callers

nothing calls this directly

Calls 11

try_load_autoexecFunction · 0.85
write_fileMethod · 0.80
continue_from_hereMethod · 0.80
get_machineMethod · 0.80
expect_varMethod · 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