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

Function test_mount_list

std/src/storage/cmds.rs:901–928  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

899
900 #[test]
901 fn test_mount_list() {
902 let mut t = Tester::default();
903 let other = InMemoryDrive::default();
904 t.get_storage().borrow_mut().attach("o", "origin://", Box::from(other)).unwrap();
905
906 let mut prints = vec![
907 "",
908 " Name Target",
909 " MEMORY memory://",
910 " O origin://",
911 "",
912 " 2 drive(s)",
913 "",
914 ];
915 t.run("MOUNT").expect_prints(prints.clone()).check();
916
917 t.get_storage().borrow_mut().cd("o:").unwrap();
918 t.get_storage().borrow_mut().unmount("memory").unwrap();
919 prints.extend([
920 "",
921 " Name Target",
922 " O origin://",
923 "",
924 " 1 drive(s)",
925 "",
926 ]);
927 t.run("MOUNT").expect_prints(prints.clone()).check();
928 }
929
930 #[test]
931 fn test_mount_mount() {

Callers

nothing calls this directly

Calls 7

attachMethod · 0.80
cdMethod · 0.80
unmountMethod · 0.80
get_storageMethod · 0.45
checkMethod · 0.45
expect_printsMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected