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