()
| 694 | |
| 695 | #[test] |
| 696 | fn test_directory_del() { |
| 697 | let dir = tempdir().unwrap(); |
| 698 | let db_path = dir.path().join("pristine"); |
| 699 | let pristine = Pristine::open(&db_path).unwrap(); |
| 700 | |
| 701 | let mut txn = pristine.write_txn().unwrap(); |
| 702 | let inode = txn.alloc_inode().unwrap(); |
| 703 | |
| 704 | use crate::pristine::tables::directory_flags; |
| 705 | txn.put_directory(inode, directory_flags::DIR_EXPLICIT) |
| 706 | .unwrap(); |
| 707 | |
| 708 | // Delete the directory marker |
| 709 | let old_flags = txn.del_directory(inode).unwrap(); |
| 710 | assert_eq!(old_flags, Some(directory_flags::DIR_EXPLICIT)); |
| 711 | |
| 712 | // No longer a directory |
| 713 | assert!(!TreeTxnT::is_directory(&txn, inode).unwrap()); |
| 714 | |
| 715 | txn.commit().unwrap(); |
| 716 | } |
| 717 | |
| 718 | #[test] |
| 719 | fn test_directory_update_flags() { |
nothing calls this directly
no test coverage detected