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

Function test_mount_cloud_share_ok

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

Source from the content-addressed store, hash-verified

472
473 #[test]
474 fn test_mount_cloud_share_ok() {
475 let tester = Tester::default();
476 let (console, storage) = (tester.get_console(), tester.get_storage());
477 let continuation = tester.continue_from_here();
478
479 storage.borrow_mut().register_scheme(
480 "cloud",
481 Box::from(MockDriveFactory { exp_username: "foo", exp_file: "bar.bas" }),
482 );
483
484 let path = mount_cloud_share(console, storage, "foo/bar.bas").unwrap();
485 assert_eq!("AUTORUN:/bar.bas", path);
486 assert_eq!(Some(&"cloud://foo"), tester.get_storage().borrow().mounted().get("AUTORUN"));
487 assert_eq!("AUTORUN:/", tester.get_storage().borrow().cwd());
488 continuation.run("").expect_prints(["Mounting cloud://foo as AUTORUN..."]).check();
489 }
490
491 #[test]
492 fn test_run_from_storage_path_no_repl() {

Callers

nothing calls this directly

Calls 8

mount_cloud_shareFunction · 0.85
continue_from_hereMethod · 0.80
register_schemeMethod · 0.80
get_consoleMethod · 0.45
get_storageMethod · 0.45
checkMethod · 0.45
expect_printsMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected