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

Function test_storage_make_canonical_with_extension_ok

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

Source from the content-addressed store, hash-verified

877
878 #[test]
879 fn test_storage_make_canonical_with_extension_ok() {
880 let mut storage = Storage::default();
881 storage.mount("some", "memory://").unwrap();
882
883 assert_eq!("MEMORY:foo.bas", storage.make_canonical_with_extension("foo", "bas").unwrap());
884 assert_eq!(
885 "MEMORY:/foo.bar",
886 storage.make_canonical_with_extension("/foo.bar", "bas").unwrap()
887 );
888
889 assert_eq!(
890 "MEMORY:a.bas",
891 storage.make_canonical_with_extension("memory:a", "bas").unwrap()
892 );
893 assert_eq!(
894 "MEMORY:/a.bas",
895 storage.make_canonical_with_extension("memory:/a.bas", "bas").unwrap()
896 );
897 }
898
899 #[test]
900 fn test_storage_make_canonical_with_extension_errors() {

Callers

nothing calls this directly

Calls 1

mountMethod · 0.80

Tested by

no test coverage detected