From 5df46bf2d512a4fc2d5264b1e6eef91c9e13d51e Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 15 May 2020 19:10:21 +0200 Subject: [PATCH] tests: archive info: make deterministic nothing worse than jumping test results due to not sorting the tests and thus making discussions harder (which test # failed) and it may imply another error by mistake. Signed-off-by: Thomas Lamprecht --- test/archive_info_test.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/archive_info_test.pm b/test/archive_info_test.pm index 60d606e..ce873b3 100644 --- a/test/archive_info_test.pm +++ b/test/archive_info_test.pm @@ -71,10 +71,10 @@ my $bkp_suffix = { }; # create more test cases for backup files matches -foreach my $virt (keys %$bkp_suffix) { - my ($format, $decomp) = @{ $bkp_suffix->{$virt} }; +for my $virt (sort keys %$bkp_suffix) { + my ($format, $decomp) = $bkp_suffix->{$virt}->@*; - foreach my $suffix (keys %$decomp) { + for my $suffix (sort keys %$decomp) { my @arr = ( { description => "Backup archive, $virt, $format.$suffix", @@ -101,7 +101,7 @@ my $non_bkp_suffix = { }; # create tests for failed matches -foreach my $virt (keys %$non_bkp_suffix) { +for my $virt (sort keys %$non_bkp_suffix) { my $suffix = $non_bkp_suffix->{$virt}; foreach my $s (@$suffix) { my @arr = (