@@ -4,18 +4,18 @@ use Test::More;
44use version;
55
66my %prereqs = (
7- ' Archive::Tar' => ' ' ,
8- ' Archive::Zip' => ' <= 1.65?(cloud6|cloud7|addons)' ,
9- ' DBD::mysql' => ' 4.000' ,
10- ' DBI' => ' 1.633' ,
11- ' GD' => 0,
12- ' Graphics::Magick' => 0,
13- ' Image::Magick?' => 0,
14- ' Image::Magick::Q16?' => 0,
7+ ' Archive::Tar' => ' ' ,
8+ ' Archive::Zip' => ' <= 1.65?(cloud6|cloud7|addons)' ,
9+ ' DBD::mysql' => ' 4.000' ,
10+ ' DBI' => ' 1.633' ,
11+ ' GD' => 0,
12+ ' Graphics::Magick' => 0,
13+ ' Image::Magick?' => 0,
14+ ' Image::Magick::Q16?' => 0,
1515 ' Image::Magick::Q16HDRI?' => 0,
16- ' Imager' => 0,
17- ' Net::SSLeay' => ' 1.85' ,
18- ' IO::Socket::SSL' => ' 2.058' ,
16+ ' Imager' => 0,
17+ ' Net::SSLeay' => ' 1.85' ,
18+ ' IO::Socket::SSL' => ' 2.058' ,
1919);
2020
2121my $image_name = $ENV {TEST_IMAGE };
@@ -56,7 +56,7 @@ for my $module (sort keys %prereqs) {
5656 if (my $condition = $1 ) {
5757 $todo = 0 if $image_name !~ / $condition / ;
5858 }
59- SKIP: {
59+ SKIP: {
6060 local $TODO = ' may fail' if $todo ;
6161 my ($op , $required_version );
6262 if ($required =~ / / ) {
@@ -74,45 +74,45 @@ for my $module (sort keys %prereqs) {
7474my ($perl_version ) = ` perl -v` =~ / v(5\.\d +\.\d +)/ ;
7575ok $perl_version , " $image_name : Perl exists ($perl_version )" ;
7676
77- my $gd_version = eval { GD::LIBGD_VERSION() } || 0;
77+ my $gd_version = eval { GD::LIBGD_VERSION() } || 0;
7878my $gd_version_str = eval { GD::VERSION_STRING() } || ' unknown' ;
7979note " $image_name : GD version $gd_version ($gd_version_str )" ;
8080if ($gd_version >= 2.0101) {
81- ok eval { GD::supportsFileType(' test.gif' ) }, " $image_name : GD supports GIF" ;
82- ok eval { GD::supportsFileType(' test.png' ) }, " $image_name : GD supports PNG" ;
83- ok eval { GD::supportsFileType(' test.jpg' ) }, " $image_name : GD supports JPEG" ;
84- ok eval { GD::supportsFileType(' test.bmp' ) }, " $image_name : GD supports BMP" ;
81+ ok eval { GD::supportsFileType(' test.gif' ) }, " $image_name : GD supports GIF" ;
82+ ok eval { GD::supportsFileType(' test.png' ) }, " $image_name : GD supports PNG" ;
83+ ok eval { GD::supportsFileType(' test.jpg' ) }, " $image_name : GD supports JPEG" ;
84+ ok eval { GD::supportsFileType(' test.bmp' ) }, " $image_name : GD supports BMP" ;
8585 ok eval { GD::supportsFileType(' test.webp' ) }, " $image_name : GD supports WEBP" ;
8686}
8787
8888my $has_imager_webp = eval { require Imager::File::WEBP };
89- my %imager_supports = map {$_ => 1} Imager-> read_types;
90- ok $imager_supports {gif }, " $image_name : Imager supports GIF" ;
91- ok $imager_supports {png }, " $image_name : Imager supports PNG" ;
89+ my %imager_supports = map { $_ => 1 } Imager-> read_types;
90+ ok $imager_supports {gif }, " $image_name : Imager supports GIF" ;
91+ ok $imager_supports {png }, " $image_name : Imager supports PNG" ;
9292ok $imager_supports {jpeg }, " $image_name : Imager supports JPEG" ;
93- ok $imager_supports {bmp }, " $image_name : Imager supports BMP" ;
93+ ok $imager_supports {bmp }, " $image_name : Imager supports BMP" ;
9494SKIP: {
9595 local $TODO = ' WebP may not be supported' unless $has_imager_webp ;
9696 ok $imager_supports {webp }, " $image_name : Imager supports WebP" ;
9797}
9898
99- my %imagemagick_supports = map {$_ => 1} Image::Magick-> QueryFormat;
100- ok $imagemagick_supports {gif }, " $image_name : ImageMagick supports GIF" ;
101- ok $imagemagick_supports {png }, " $image_name : ImageMagick supports PNG" ;
99+ my %imagemagick_supports = map { $_ => 1 } Image::Magick-> QueryFormat;
100+ ok $imagemagick_supports {gif }, " $image_name : ImageMagick supports GIF" ;
101+ ok $imagemagick_supports {png }, " $image_name : ImageMagick supports PNG" ;
102102ok $imagemagick_supports {jpeg }, " $image_name : ImageMagick supports JPEG" ;
103- ok $imagemagick_supports {bmp }, " $image_name : ImageMagick supports BMP" ;
103+ ok $imagemagick_supports {bmp }, " $image_name : ImageMagick supports BMP" ;
104104SKIP: {
105105 local $TODO = ' WebP may not be supported' if $image_name =~ / ^(?:amazonlinux|bionic|centos6|centos7|jessie|oracle|stretch|trusty)$ / ;
106106 ok $imagemagick_supports {webp }, " $image_name : ImageMagick supports WebP" ;
107107}
108108my $imagemagick_depth = Image::Magick-> new-> Get(' depth' );
109109is $imagemagick_depth => ' 16' , " $image_name : ImageMagick Quantum Depth: Q$imagemagick_depth " ;
110110
111- my %graphicsmagick_supports = map {$_ => 1} Graphics::Magick-> QueryFormat;
112- ok $graphicsmagick_supports {gif }, " $image_name : GraphicsMagick supports GIF" ;
113- ok $graphicsmagick_supports {png }, " $image_name : GraphicsMagick supports PNG" ;
111+ my %graphicsmagick_supports = map { $_ => 1 } Graphics::Magick-> QueryFormat;
112+ ok $graphicsmagick_supports {gif }, " $image_name : GraphicsMagick supports GIF" ;
113+ ok $graphicsmagick_supports {png }, " $image_name : GraphicsMagick supports PNG" ;
114114ok $graphicsmagick_supports {jpeg }, " $image_name : GraphicsMagick supports JPEG" ;
115- ok $graphicsmagick_supports {bmp }, " $image_name : GraphicsMagick supports BMP" ;
115+ ok $graphicsmagick_supports {bmp }, " $image_name : GraphicsMagick supports BMP" ;
116116SKIP: {
117117 local $TODO = ' WebP may not be supported' if $image_name =~ / centos6|jessie|trusty/ ;
118118 ok $graphicsmagick_supports {webp }, " $image_name : GraphicsMagick supports WebP" ;
@@ -134,21 +134,25 @@ ok $php_version, "$image_name: PHP exists ($php_version)";
134134(my $php_version_number = $php_version ) =~ s /\.\d +$// ;
135135
136136my $phpinfo = ` php -i` ;
137- ok $phpinfo =~ / (?:Multibyte decoding support using mbstring => enabled|Zend Multibyte Support => provided by mbstring|mbstring extension makes use of "streamable kanji code filter and converter")/ , " $image_name : PHP has mbstring" ;
138- ok $phpinfo =~ / PDO drivers => .*?mysql/ , " $image_name : PHP has PDO mysql driver" ;
139- ok $phpinfo =~ / GD Support => enabled/ , " $image_name : PHP has GD" ;
140- ok $phpinfo =~ / DOM.XML => enabled/ , " $image_name : PHP has DOM/XML" ;
141- ok $phpinfo =~ / GIF Read Support => enabled/ , " $image_name : PHP supports GIF read" ;
137+ ok $phpinfo =~ / (?:
138+ Multibyte[ ]decoding[ ]support[ ]using[ ]mbstring[ ]=>[ ]enabled |
139+ Zend[ ]Multibyte[ ]Support[ ]=>[ ]provided[ ]by[ ]mbstring |
140+ mbstring[ ]extension[ ]makes[ ]use[ ]of[ ]"streamable[ ]kanji[ ]code[ ]filter[ ]and[ ]converter"
141+ )/x , " $image_name : PHP has mbstring" ;
142+ ok $phpinfo =~ / PDO drivers => .*?mysql/ , " $image_name : PHP has PDO mysql driver" ;
143+ ok $phpinfo =~ / GD Support => enabled/ , " $image_name : PHP has GD" ;
144+ ok $phpinfo =~ / DOM.XML => enabled/ , " $image_name : PHP has DOM/XML" ;
145+ ok $phpinfo =~ / GIF Read Support => enabled/ , " $image_name : PHP supports GIF read" ;
142146ok $phpinfo =~ / GIF Create Support => enabled/ , " $image_name : PHP supports GIF create" ;
143- ok $phpinfo =~ / JPEG Support => enabled/ , " $image_name : PHP supports JPEG" ;
144- ok $phpinfo =~ / PNG Support => enabled/ , " $image_name : PHP supports PNG" ;
145- ok $phpinfo =~ / WebP Support => enabled/ , " $image_name : PHP supports WebP" ;
147+ ok $phpinfo =~ / JPEG Support => enabled/ , " $image_name : PHP supports JPEG" ;
148+ ok $phpinfo =~ / PNG Support => enabled/ , " $image_name : PHP supports PNG" ;
149+ ok $phpinfo =~ / WebP Support => enabled/ , " $image_name : PHP supports WebP" ;
146150SKIP: {
147151 local $TODO = ' Memcache may not be supported' if $image_name =~ / amazonlinux|oracle|centos8/ ;
148152 ok $phpinfo =~ / memcache support => enabled/ , " $image_name : PHP supports memcache" ;
149153}
150154if ($image_name =~ / oracle/ ) {
151- ok $phpinfo =~ / oci8/ , " $image_name : PHP supports oci8" ;
155+ ok $phpinfo =~ / oci8/ , " $image_name : PHP supports oci8" ;
152156 ok $phpinfo =~ / PDO drivers .*oci/ , " $image_name : PHP PDO supports oci" ;
153157}
154158
@@ -209,12 +213,12 @@ if ($sql_mode =~ /Can't connect to local MySQL/) {
209213 fail " $image_name : failed to connect to local mysql" if $entrypoint_is_executed ;
210214}
211215if ($mysql_version =~ / ^5\. [567]\. / or $mysql_version =~ / ^10\. [0123]\. / ) {
212- my ($file_format ) = ` mysql -Nse 'select \@\@ innodb_file_format'` =~ / (\w +)/ ;
216+ my ($file_format ) = ` mysql -Nse 'select \@\@ innodb_file_format'` =~ / (\w +)/ ;
213217 my ($file_per_table ) = ` mysql -Nse 'select \@\@ innodb_file_per_table'` =~ / (\w +)/ ;
214- my ($large_prefix ) = ` mysql -Nse 'select \@\@ innodb_large_prefix'` =~ / (\w +)/ ;
215- $file_format //= ' ' ;
218+ my ($large_prefix ) = ` mysql -Nse 'select \@\@ innodb_large_prefix'` =~ / (\w +)/ ;
219+ $file_format //= ' ' ;
216220 $file_per_table //= ' ' ;
217- $large_prefix //= ' ' ;
221+ $large_prefix //= ' ' ;
218222 note " InnoDB: file format $file_format , file per table $file_per_table , large prefix $large_prefix " ;
219223}
220224
@@ -232,7 +236,7 @@ ok $locale =~ /ja_JP\.utf8/, "$image_name: has Japanese locale" or warn $locale;
232236my ($tar ) = ` tar --version 2>&1` =~ / \A\w *tar (.+?[0-9.]+)/ ;
233237ok $tar , " $image_name : has tar $tar " ;
234238
235- my ($zip ) = ` zip --version 2>&1` =~ / This is Zip ([0-9.]+)/ ;;
239+ my ($zip ) = ` zip --version 2>&1` =~ / This is Zip ([0-9.]+)/ ;
236240ok $zip , " $image_name : has zip $zip " ;
237241
238242my ($unzip ) = ` unzip --version 2>&1` =~ / UnZip ([0-9.]+)/ ;
@@ -246,7 +250,7 @@ my $srgb = grep /\bsRGB\.icc$/i, @icc_profiles;
246250SKIP: {
247251 local $TODO = ' CentOS 6 has no icc profile packages' if $image_name =~ / centos6/ ;
248252 ok @icc_profiles , " $image_name : has " . join (" ," , @icc_profiles );
249- ok $srgb , " $image_name : has sRGB.icc" ;
253+ ok $srgb , " $image_name : has sRGB.icc" ;
250254}
251255
252256if ($image_name =~ / oracle/ ) {
0 commit comments