xref: /PHP-7.3/ext/gd/tests/bug53154.phpt (revision 54293d21)
1--TEST--
2Bug #53154 (Zero-height rectangle has whiskers)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
7    die("skip test requires GD 2.2.2 or higher");
8}
9?>
10--FILE--
11<?php
12$im = imagecreatetruecolor(100, 10);
13$red = imagecolorallocate($im, 255, 0, 0);
14imagerectangle($im, 5, 5, 95, 5, $red);
15var_dump(imagecolorat($im, 5, 4) !== $red);
16var_dump(imagecolorat($im, 5, 6) !== $red);
17var_dump(imagecolorat($im, 95, 4) !== $red);
18var_dump(imagecolorat($im, 95, 6) !== $red);
19?>
20--EXPECT--
21bool(true)
22bool(true)
23bool(true)
24bool(true)
25