From c705c8573d648e00cd4921435d913e6493fa3a65 Mon Sep 17 00:00:00 2001 From: Dan Christensen Date: Sun, 12 Feb 2023 08:28:14 -0500 Subject: [PATCH] testsuite/hashindex.py: add a few more tests --- src/borg/testsuite/hashindex.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/borg/testsuite/hashindex.py b/src/borg/testsuite/hashindex.py index 1f09ae41b..d29ea722b 100644 --- a/src/borg/testsuite/hashindex.py +++ b/src/borg/testsuite/hashindex.py @@ -523,11 +523,25 @@ class HashIndexCompactTestCase(HashIndexDataTestCase): def test_empty(self): self.compare_compact("DEDEED") + def test_num_buckets_zero(self): + self.compare_compact("") + def test_already_compact(self): self.compare_compact("***") def test_all_at_front(self): + self.compare_compact("*DEEED") + self.compare_compact("**DEED") self.compare_compact("***EED") + self.compare_compact("****ED") + self.compare_compact("*****D") + + def test_all_at_back(self): + self.compare_compact("EDEEE*") + self.compare_compact("DEDE**") + self.compare_compact("DED***") + self.compare_compact("ED****") + self.compare_compact("D*****") def test_merge(self): master = ChunkIndex()