From 33442edce73d2be8e8210af992e0ec5803d32a6e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 9 Sep 2018 15:50:43 +0200 Subject: handle_added_archives_with_db.t: Extend to verify that PathTimeTable/DB caching doesn't cause problems Signed-off-by: Florian Pritz --- t/handle_added_archives_with_db.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/handle_added_archives_with_db.t b/t/handle_added_archives_with_db.t index c587261..e090e25 100644 --- a/t/handle_added_archives_with_db.t +++ b/t/handle_added_archives_with_db.t @@ -26,6 +26,11 @@ for my $in_memory (0,1) { $cb->("XXX, 1970-01-01 00:00:13 boot/foo"); $cb->("XXX, 1970-01-01 00:00:13 boot/foo/blub"); $cb->("XXX, 1970-01-01 00:00:19 boot/foo/bar"); + $cb->("XXX, 1970-01-01 00:00:02 boot/test1"); + $cb->("XXX, 1970-01-01 00:00:03 boot/test1/f1"); + $cb->("XXX, 1970-01-01 00:00:04 boot/test1/f2"); + $cb->("XXX, 1970-01-01 00:00:03 boot/test1/f3"); + $cb->("XXX, 1970-01-01 00:00:02 boot/test1/f4"); } ); # Call the actual function we want to test @@ -40,6 +45,11 @@ for my $in_memory (0,1) { eq_or_diff($db->get_archives_for_path('boot/foo/blub'), [{archive => 'archive-1', modification_time => 13},]); eq_or_diff($db->get_archives_for_path('boot/grub'), [{archive => 'archive-1', modification_time => 20},]); eq_or_diff($db->get_archives_for_path('boot/grub/grub.cfg'), [{archive => 'archive-1', modification_time => 8},]); + eq_or_diff($db->get_archives_for_path('boot/test1'), [{archive => 'archive-1', modification_time => 4},]); + eq_or_diff($db->get_archives_for_path('boot/test1/f1'), [{archive => 'archive-1', modification_time => 3},]); + eq_or_diff($db->get_archives_for_path('boot/test1/f2'), [{archive => 'archive-1', modification_time => 4},]); + eq_or_diff($db->get_archives_for_path('boot/test1/f3'), [{archive => 'archive-1', modification_time => 3},]); + eq_or_diff($db->get_archives_for_path('boot/test1/f4'), [{archive => 'archive-1', modification_time => 2},]); eq_or_diff($db->get_archives_for_path('lulz'), [{archive => 'archive-1', modification_time => undef},]); } -- cgit v1.2.3-24-g4f1b