MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_set_permissions

Function test_set_permissions

atomic-core/src/output/memory.rs:1027–1036  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1025
1026 #[test]
1027 fn test_set_permissions() {
1028 let wc = Memory::new();
1029 wc.add_file("test.txt", b"");
1030
1031 wc.set_permissions("test.txt", 0o755).unwrap();
1032
1033 let meta = wc.file_metadata("test.txt").unwrap();
1034 assert_eq!(meta.permissions, 0o755);
1035 assert!(meta.is_executable());
1036 }
1037
1038 #[test]
1039 fn test_set_permissions_not_found() {

Callers

nothing calls this directly

Calls 4

add_fileMethod · 0.45
unwrapMethod · 0.45
set_permissionsMethod · 0.45
file_metadataMethod · 0.45

Tested by

no test coverage detected