| 2192 | |
| 2193 | #[test] |
| 2194 | fn test_read_empty_database() { |
| 2195 | let dir = tempdir().unwrap(); |
| 2196 | let db_path = dir.path().join("pristine"); |
| 2197 | let pristine = Pristine::open(&db_path).unwrap(); |
| 2198 | |
| 2199 | let txn = pristine.read_txn().unwrap(); |
| 2200 | |
| 2201 | // Empty database should return None for lookups |
| 2202 | assert!(txn.get_external(NodeId::new(1)).unwrap().is_none()); |
| 2203 | assert!(txn.get_view("main").unwrap().is_none()); |
| 2204 | assert!(txn.get_inode("test.txt").unwrap().is_none()); |
| 2205 | assert!(txn.list_views().unwrap().is_empty()); |
| 2206 | } |
| 2207 | } |