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

Function test_pwd_with_system_path

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

Source from the content-addressed store, hash-verified

973
974 #[test]
975 fn test_pwd_with_system_path() {
976 let dir = tempfile::tempdir().unwrap();
977 let dir = dir.path().canonicalize().unwrap();
978
979 let mut t = Tester::default();
980 {
981 let storage = t.get_storage();
982 let storage = &mut *storage.borrow_mut();
983 storage.register_scheme("file", Box::from(DirectoryDriveFactory::default()));
984 storage.mount("other", &format!("file://{}", dir.display())).unwrap();
985 storage.cd("other:/").unwrap();
986 }
987
988 t.run("PWD")
989 .expect_prints([
990 "",
991 " Working directory: OTHER:/",
992 &format!(" System location: {}", dir.join("").display()),
993 "",
994 ])
995 .check();
996 }
997
998 #[test]
999 fn test_unmount_ok() {

Callers

nothing calls this directly

Calls 7

register_schemeMethod · 0.80
mountMethod · 0.80
cdMethod · 0.80
get_storageMethod · 0.45
checkMethod · 0.45
expect_printsMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected