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

Function test_storage_system_path_ok

std/src/storage/mod.rs:1211–1227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1209
1210 #[test]
1211 fn test_storage_system_path_ok() {
1212 let dir = tempfile::tempdir().unwrap();
1213 let dir = dir.path().canonicalize().unwrap();
1214
1215 let mut storage = Storage::default();
1216 storage
1217 .attach(
1218 "c",
1219 &format!("file://{}", dir.display()),
1220 Box::from(DirectoryDrive::new(dir.clone()).unwrap()),
1221 )
1222 .unwrap();
1223
1224 assert!(storage.system_path("memory:/foo").unwrap().is_none());
1225 assert_eq!(dir.join("some name"), storage.system_path("c:/some name").unwrap().unwrap());
1226 assert_eq!(dir.join("xyz"), storage.system_path("c:xyz").unwrap().unwrap());
1227 }
1228
1229 #[test]
1230 fn test_storage_system_path_of_cwd() {

Callers

nothing calls this directly

Calls 1

attachMethod · 0.80

Tested by

no test coverage detected