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

Function test_storage_system_path_of_cwd

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

Source from the content-addressed store, hash-verified

1228
1229 #[test]
1230 fn test_storage_system_path_of_cwd() {
1231 let dir = tempfile::tempdir().unwrap();
1232 let dir = dir.path().canonicalize().unwrap();
1233
1234 let mut storage = Storage::default();
1235 storage
1236 .attach(
1237 "c",
1238 &format!("file://{}", dir.display()),
1239 Box::from(DirectoryDrive::new(dir.clone()).unwrap()),
1240 )
1241 .unwrap();
1242
1243 assert!(storage.system_path(&storage.cwd()).unwrap().is_none());
1244
1245 storage.cd("c:/").unwrap();
1246 assert_eq!(dir, storage.system_path(&storage.cwd()).unwrap().unwrap());
1247 }
1248
1249 #[test]
1250 fn test_storage_system_path_errors() {

Callers

nothing calls this directly

Calls 2

attachMethod · 0.80
cdMethod · 0.80

Tested by

no test coverage detected