com php-src: fix/improve tests: ext/bcmath/tests/bug72093-win32.phpt ext/bcmath/tests/bug72093.phpt ext/exif/tests/bug72094.phpt
ext/gd/tests/bug71912.phpt

From: Date: Wed, 27 Apr 2016 12:35:23 +0000
Subject: com php-src: fix/improve tests: ext/bcmath/tests/bug72093-win32.phpt ext/bcmath/tests/bug72093.phpt ext/exif/tests/bug72094.phpt
ext/gd/tests/bug71912.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91884@lists.php.net to get a copy of this message
Commit: f16bc4246551f56e127348a06dac80a0f0939036 Author: Anatol Belski <ab@php.net> Wed, 27 Apr 2016 13:16:57 +0200 Parents: 66f92ec63bb5f062986e86245e1dc049561119ad Branches: PHP-7.0.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f16bc4246551f56e127348a06dac80a0f0939036 Log: fix/improve tests Changed paths: A ext/bcmath/tests/bug72093-win32.phpt M ext/bcmath/tests/bug72093.phpt M ext/exif/tests/bug72094.phpt M ext/gd/tests/bug71912.phpt Diff: diff --git a/ext/bcmath/tests/bug72093-win32.phpt b/ext/bcmath/tests/bug72093-win32.phpt new file mode 100644 index 0000000..a9b2077 --- /dev/null +++ b/ext/bcmath/tests/bug72093-win32.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition +--SKIPIF-- +<?php +if(!extension_loaded("bcmath")) print "skip"; +if (substr(PHP_OS, 0, 3) != 'WIN') { + die('skip valid only for windows'); +} +?> +--FILE-- +<?php +var_dump(bcpowmod(1, "A", 128, -200)); +var_dump(bcpowmod(1, 1.2, 1, 1)); +?> +--EXPECTF-- +string(1) "1" +string(3) "0.0" +bc math warning: non-zero scale in exponent diff --git a/ext/bcmath/tests/bug72093.phpt b/ext/bcmath/tests/bug72093.phpt index be664b8..911af56 100644 --- a/ext/bcmath/tests/bug72093.phpt +++ b/ext/bcmath/tests/bug72093.phpt @@ -1,7 +1,12 @@ --TEST-- Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition --SKIPIF-- -<?php if(!extension_loaded("bcmath")) print "skip"; ?> +<?php +if(!extension_loaded("bcmath")) print "skip"; +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip Not valid for windows'); +} +?> --FILE-- <?php var_dump(bcpowmod(1, "A", 128, -200)); diff --git a/ext/exif/tests/bug72094.phpt b/ext/exif/tests/bug72094.phpt index 17674d0..611faf9 100644 --- a/ext/exif/tests/bug72094.phpt +++ b/ext/exif/tests/bug72094.phpt @@ -11,51 +11,51 @@ print_r(exif_read_data(__DIR__ . '/bug72094_4.jpg')); ?> DONE --EXPECTF-- -Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): File structure corrupted in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): File structure corrupted in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_1.jpg): Invalid JPEG file in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_1.jpg): Invalid JPEG file in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_2.jpg): Illegal IFD size in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_2.jpg): Illegal IFD size in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): File structure corrupted in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): File structure corrupted in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_3.jpg): Invalid JPEG file in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_3.jpg): Invalid JPEG file in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_4.jpg): Invalid TIFF start (1) in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_4.jpg): Invalid TIFF start (1) in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_4.jpg): File structure corrupted in %s/bug72094.php on line %d +Warning: exif_read_data(bug72094_4.jpg): File structure corrupted in %s%ebug72094.php on line %d -Warning: exif_read_data(bug72094_4.jpg): Invalid JPEG file in %s/bug72094.php on line %d -DONE \ No newline at end of file +Warning: exif_read_data(bug72094_4.jpg): Invalid JPEG file in %s%ebug72094.php on line %d +DONE diff --git a/ext/gd/tests/bug71912.phpt b/ext/gd/tests/bug71912.phpt index 33b079d..c86188b 100644 --- a/ext/gd/tests/bug71912.phpt +++ b/ext/gd/tests/bug71912.phpt @@ -7,10 +7,10 @@ Bug #71912 (libgd: signedness vulnerability) ?> --FILE-- <?php -imagecreatefromgd2(__DIR__."/invalid_neg_size.gd2"); +imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size.gd2"); ?> OK --EXPECTF-- -Warning: imagecreatefromgd2(): '%s/invalid_neg_size.gd2' is not a valid GD2 file in %s/bug71912.php on line %d -OK \ No newline at end of file +Warning: imagecreatefromgd2(): '%s%einvalid_neg_size.gd2' is not a valid GD2 file in %s%ebug71912.php on line %d +OK

« previous php.cvs (#91884) next »