From 00ffd8d66da9a426b9be192b3311bafa1ab76332 Mon Sep 17 00:00:00 2001 From: Damien Lallement Date: Fri, 9 Dec 2011 01:03:54 +0000 Subject: - update README - remove 'mono' as a dependance - remove the 'mono' test for 'autorun' as it was useless - update/fix some 'FIXME' - update DVD/CD test size with better values - update 'badwords' and 'temp files' check --- t/000_test_env.t | 4 +--- t/001_check_file.t | 8 ++++---- t/003_is_hybrid.t | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 't') diff --git a/t/000_test_env.t b/t/000_test_env.t index 9484e5b..684efbf 100644 --- a/t/000_test_env.t +++ b/t/000_test_env.t @@ -8,14 +8,12 @@ bail_on_fail; my ($image_path) = @ARGV; -# FIXME why need to be root? for mounting the ISO only? -# FIXME USER or USERNAME? is($ENV{USERNAME}, 'root', "Current user is root."); # TODO move this elsewhere maybe? sub pkg_check { my ($pkg) = @_; return system("rpm -q $pkg >/dev/null"); } -my @packages = qw(cdrkit cdrkit-isotools mono gnupg); +my @packages = qw(cdrkit cdrkit-isotools gnupg); foreach my $p (@packages) { is(pkg_check($p), 0, sprintf("%s is installed.", $p)); diff --git a/t/001_check_file.t b/t/001_check_file.t index f82b149..2eded9f 100644 --- a/t/001_check_file.t +++ b/t/001_check_file.t @@ -24,7 +24,7 @@ if (scalar %info) { } } else { fail 'ISO has valid filename.'; - diag 'See https://wiki.mageia.org/en/Product_naming'; + diag 'See https://wiki.mageia.org/en/Product_naming for more information.'; } # are files available? @@ -32,12 +32,12 @@ ok -r $image_path, 'ISO file is readable.' or diag("$image_path: $!"); # is file size correct? -my $du = `du --apparent-size --block-size=M $image_path`; +my $du = `du --apparent-size --block-size=MB $image_path`; my @size_name = split(/\t/, $du); my $size = $size_name[0]; -# FIXME put correct sizes here -my %max_sizes = ( "CD" => "740M", "DVD" => "4200M" ); +# Correct sizes: CD == 700MB & DVD == 4,700.373MB +my %max_sizes = ( "CD" => "700MB", "DVD" => "4700MB" ); ok ($size le $max_sizes{$info{"medium"}}, sprintf("File has a working size (%s) for its medium type (%s, max %s).", $size, $info{"medium"}, $max_sizes{$info{"medium"}})); diff --git a/t/003_is_hybrid.t b/t/003_is_hybrid.t index 37ccbcd..343bc7f 100644 --- a/t/003_is_hybrid.t +++ b/t/003_is_hybrid.t @@ -9,7 +9,7 @@ my ($image_path) = @ARGV; ok (is_hybrid($image_path, 0), "Is hybrid"); -# Verification if the Iso is hybrid +# Verification if the ISO is hybrid sub is_hybrid { my ($img, $full) = @_; -- cgit v1.2.1