| 3147 | |
| 3148 | #[test] |
| 3149 | fn test_read_empty_database() { |
| 3150 | let dir = tempdir().unwrap(); |
| 3151 | let db_path = dir.path().join("pristine"); |
| 3152 | let pristine = Pristine::open(&db_path).unwrap(); |
| 3153 | |
| 3154 | let txn = pristine.read_txn().unwrap(); |
| 3155 | |
| 3156 | // Empty database should return None for lookups |
| 3157 | assert!(txn.get_external(NodeId::new(1)).unwrap().is_none()); |
| 3158 | assert!(txn.get_view("main").unwrap().is_none()); |
| 3159 | assert!(txn.get_inode("test.txt").unwrap().is_none()); |
| 3160 | assert!(txn.list_views().unwrap().is_empty()); |
| 3161 | } |
| 3162 | |
| 3163 | #[test] |
| 3164 | fn healthy_graph_and_inode_multimap_reads_remain_ordered_and_filtered() { |