()
| 825 | |
| 826 | #[test] |
| 827 | fn test_directory_del() { |
| 828 | let dir = tempdir().unwrap(); |
| 829 | let db_path = dir.path().join("pristine"); |
| 830 | let pristine = Pristine::open(&db_path).unwrap(); |
| 831 | |
| 832 | let mut txn = pristine.write_txn().unwrap(); |
| 833 | let inode = txn.alloc_inode().unwrap(); |
| 834 | |
| 835 | use crate::pristine::tables::directory_flags; |
| 836 | txn.put_directory(inode, directory_flags::DIR_EXPLICIT) |
| 837 | .unwrap(); |
| 838 | |
| 839 | // Delete the directory marker |
| 840 | let old_flags = txn.del_directory(inode).unwrap(); |
| 841 | assert_eq!(old_flags, Some(directory_flags::DIR_EXPLICIT)); |
| 842 | |
| 843 | // No longer a directory |
| 844 | assert!(!TreeTxnT::is_directory(&txn, inode).unwrap()); |
| 845 | |
| 846 | txn.commit().unwrap(); |
| 847 | } |
| 848 | |
| 849 | #[test] |
| 850 | fn test_directory_update_flags() { |
nothing calls this directly
no test coverage detected