()
| 490 | |
| 491 | #[test] |
| 492 | fn test_run_from_storage_path_no_repl() { |
| 493 | let tester = Tester::default(); |
| 494 | let (console, storage, program) = |
| 495 | (tester.get_console(), tester.get_storage(), tester.get_program()); |
| 496 | let mut continuation = tester.continue_from_here(); |
| 497 | |
| 498 | storage.borrow_mut().mount("SOME", "memory://").unwrap(); |
| 499 | block_on(storage.borrow_mut().put("SOME:bar.bas", MockDriveFactory::SCRIPT.as_bytes())) |
| 500 | .unwrap(); |
| 501 | |
| 502 | block_on(run_from_storage_path( |
| 503 | continuation.get_machine(), |
| 504 | console, |
| 505 | storage, |
| 506 | program, |
| 507 | "some:bar.bas", |
| 508 | false, |
| 509 | )) |
| 510 | .unwrap(); |
| 511 | continuation |
| 512 | .run("") |
| 513 | .expect_prints(["Loading SOME:bar.bas...", "Starting...", ""]) |
| 514 | .expect_clear() |
| 515 | .expect_prints(["Success", "", "**** Program exited due to EOF ****"]) |
| 516 | .expect_file("SOME:/bar.bas", MockDriveFactory::SCRIPT) |
| 517 | .expect_program(Some("SOME:bar.bas"), MockDriveFactory::SCRIPT) |
| 518 | .check(); |
| 519 | } |
| 520 | |
| 521 | #[test] |
| 522 | fn test_run_from_storage_path_with_default_extension_and_repl() { |
nothing calls this directly
no test coverage detected