felipe Wed Jul 1 02:32:10 2009 UTC
Modified files:
/php-src/ext/gd/tests jpeg2wbmp_error1.phpt jpeg2wbmp_error2.phpt
jpeg2wbmp_error3.phpt png2wbmp_error1.phpt
png2wbmp_error2.phpt png2wbmp_error3.phpt
Log:
- Fixed tests
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/jpeg2wbmp_error1.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/jpeg2wbmp_error1.phpt
diff -u php-src/ext/gd/tests/jpeg2wbmp_error1.phpt:1.1
php-src/ext/gd/tests/jpeg2wbmp_error1.phpt:1.2
--- php-src/ext/gd/tests/jpeg2wbmp_error1.phpt:1.1 Wed Jul 1 00:51:26 2009
+++ php-src/ext/gd/tests/jpeg2wbmp_error1.phpt Wed Jul 1 02:32:10 2009
@@ -19,14 +19,17 @@
$text_color = imagecolorallocate($im, 255, 255, 255);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
+$file = dirname(__FILE__) .'/simpletext.jpg';
+$file2 = dirname(__FILE__) .'/simpletext.wbmp';
+
// Save the image as 'simpletext.jpg'
-imagejpeg($im, 'simpletext.jpg');
+imagejpeg($im, $file);
// Free up memory
imagedestroy($im);
-jpeg2wbmp('simpletext.jpg', 'simpletext.wbmp', 20, 120, 9);
-jpeg2wbmp('simpletext.jpg', 'simpletext.wbmp', 20, 120, -1);
+jpeg2wbmp($file, $file2, 20, 120, 9);
+jpeg2wbmp($file', $file2, 20, 120, -1);
?>
--EXPECTF--
Warning: jpeg2wbmp(): Invalid threshold value '9' in %s on line %d
@@ -34,5 +37,6 @@
Warning: jpeg2wbmp(): Invalid threshold value '-1' in %s on line %d
--CLEAN--
<?php
-unlink('simpletext.jpg');
-?>
\ No newline at end of file
+unlink(dirname(__FILE__) .'/simpletext.jpg');
+unlink(dirname(__FILE__) .'/simpletext.wbmp');
+?>
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/jpeg2wbmp_error2.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/jpeg2wbmp_error2.phpt
diff -u php-src/ext/gd/tests/jpeg2wbmp_error2.phpt:1.1
php-src/ext/gd/tests/jpeg2wbmp_error2.phpt:1.2
--- php-src/ext/gd/tests/jpeg2wbmp_error2.phpt:1.1 Wed Jul 1 00:51:26 2009
+++ php-src/ext/gd/tests/jpeg2wbmp_error2.phpt Wed Jul 1 02:32:10 2009
@@ -14,9 +14,10 @@
?>
--FILE--
<?php
-jpeg2wbmp('', 'simpletext.wbmp', 20, 120, 8);
-jpeg2wbmp(null, 'simpletext.wbmp', 20, 120, 8);
-jpeg2wbmp(false, 'simpletext.wbmp', 20, 120, 8);
+$file = dirname(__FILE__) .'/simpletext.wbmp';
+jpeg2wbmp('', $file, 20, 120, 8);
+jpeg2wbmp(null, $file, 20, 120, 8);
+jpeg2wbmp(false, $file, 20, 120, 8);
?>
--EXPECTF--
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
@@ -26,5 +27,5 @@
Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
--CLEAN--
<?php
-unlink('simpletext.jpg');
-?>
\ No newline at end of file
+unlink(dirname(__FILE__) .'/simpletext.wbmp');
+?>
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/jpeg2wbmp_error3.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/jpeg2wbmp_error3.phpt
diff -u php-src/ext/gd/tests/jpeg2wbmp_error3.phpt:1.1
php-src/ext/gd/tests/jpeg2wbmp_error3.phpt:1.2
--- php-src/ext/gd/tests/jpeg2wbmp_error3.phpt:1.1 Wed Jul 1 00:51:26 2009
+++ php-src/ext/gd/tests/jpeg2wbmp_error3.phpt Wed Jul 1 02:32:10 2009
@@ -19,15 +19,17 @@
$text_color = imagecolorallocate($im, 255, 255, 255);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
+$file = dirname(__FILE__) .'/simpletext.jpg';
+
// Save the image as 'simpletext.jpg'
-imagejpeg($im, 'simpletext.jpg');
+imagejpeg($im, $file);
// Free up memory
imagedestroy($im);
-jpeg2wbmp('simpletext.jpg', '', 20, 120, 8);
-jpeg2wbmp('simpletext.jpg', null, 20, 120, 8);
-jpeg2wbmp('simpletext.jpg', false, 20, 120, 8);
+jpeg2wbmp($file, '', 20, 120, 8);
+jpeg2wbmp($file, null, 20, 120, 8);
+jpeg2wbmp($file, false, 20, 120, 8);
?>
--EXPECTF--
Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
@@ -37,5 +39,5 @@
Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
--CLEAN--
<?php
-unlink('simpletext.jpg');
-?>
\ No newline at end of file
+unlink(dirname(__FILE__) .'/simpletext.jpg');
+?>
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/png2wbmp_error1.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/png2wbmp_error1.phpt
diff -u php-src/ext/gd/tests/png2wbmp_error1.phpt:1.1
php-src/ext/gd/tests/png2wbmp_error1.phpt:1.2
--- php-src/ext/gd/tests/png2wbmp_error1.phpt:1.1 Wed Jul 1 00:51:26 2009
+++ php-src/ext/gd/tests/png2wbmp_error1.phpt Wed Jul 1 02:32:10 2009
@@ -19,14 +19,17 @@
$text_color = imagecolorallocate($im, 255, 255, 255);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
+$file = dirname(__FILE__) .'/simpletext.png';
+$file2 = dirname(__FILE__) .'/simpletext.wbmp';
+
// Save the image as 'simpletext.png'
-imagepng($im, 'simpletext.png');
+imagepng($im, $file);
// Free up memory
imagedestroy($im);
-png2wbmp('simpletext.png', 'simpletext.wbmp', 20, 120, 9);
-png2wbmp('simpletext.png', 'simpletext.wbmp', 20, 120, -1);
+png2wbmp($file, $file2, 20, 120, 9);
+png2wbmp($file, $file2, 20, 120, -1);
?>
--EXPECTF--
Warning: png2wbmp(): Invalid threshold value '9' in %s on line %d
@@ -34,5 +37,6 @@
Warning: png2wbmp(): Invalid threshold value '-1' in %s on line %d
--CLEAN--
<?php
-unlink('simpletext.png');
-?>
\ No newline at end of file
+unlink(dirname(__FILE__) .'/simpletext.png');
+unlink(dirname(__FILE__) .'/simpletext.wbmp');
+?>
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/png2wbmp_error2.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/png2wbmp_error2.phpt
diff -u php-src/ext/gd/tests/png2wbmp_error2.phpt:1.1
php-src/ext/gd/tests/png2wbmp_error2.phpt:1.2
--- php-src/ext/gd/tests/png2wbmp_error2.phpt:1.1 Wed Jul 1 00:51:26 2009
+++ php-src/ext/gd/tests/png2wbmp_error2.phpt Wed Jul 1 02:32:10 2009
@@ -14,9 +14,10 @@
?>
--FILE--
<?php
-png2wbmp('', 'simpletext.wbmp', 20, 120, 8);
-png2wbmp(null, 'simpletext.wbmp', 20, 120, 8);
-png2wbmp(false, 'simpletext.wbmp', 20, 120, 8);
+$file = dirname(__FILE__) .'/simpletext.wbmp';
+png2wbmp('', $file, 20, 120, 8);
+png2wbmp(null, $file, 20, 120, 8);
+png2wbmp(false, $file, 20, 120, 8);
?>
--EXPECTF--
Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
@@ -26,5 +27,5 @@
Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
--CLEAN--
<?php
-unlink('simpletext.jpg');
-?>
\ No newline at end of file
+unlink(dirname(__FILE__) .'/simpletext.wbmp');
+?>
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/png2wbmp_error3.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/png2wbmp_error3.phpt
diff -u php-src/ext/gd/tests/png2wbmp_error3.phpt:1.1
php-src/ext/gd/tests/png2wbmp_error3.phpt:1.2
--- php-src/ext/gd/tests/png2wbmp_error3.phpt:1.1 Wed Jul 1 00:51:26 2009
+++ php-src/ext/gd/tests/png2wbmp_error3.phpt Wed Jul 1 02:32:10 2009
@@ -19,15 +19,17 @@
$text_color = imagecolorallocate($im, 255, 255, 255);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
+$file = dirname(__FILE__) .'/simpletext.png';
+
// Save the image as 'simpletext.png'
-imagepng($im, 'simpletext.png');
+imagepng($im, $file);
// Free up memory
imagedestroy($im);
-png2wbmp('simpletext.png', '', 20, 120, 8);
-png2wbmp('simpletext.png', null, 20, 120, 8);
-png2wbmp('simpletext.png', false, 20, 120, 8);
+png2wbmp($file, '', 20, 120, 8);
+png2wbmp($file, null, 20, 120, 8);
+png2wbmp($file, false, 20, 120, 8);
?>
--EXPECTF--
Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
@@ -37,5 +39,5 @@
Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
--CLEAN--
<?php
-unlink('simpletext.png');
-?>
\ No newline at end of file
+unlink(dirname(__FILE__) .'/simpletext.png');
+?>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php