diff options
Diffstat (limited to 't')
-rw-r--r-- | t/handle_added_archives_with_db.t | 10 |
1 files changed, 10 insertions, 0 deletions
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},]); } |