php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61480
Patch bug48555 revision 2012-04-03 22:20 UTC by mattficken@php.net
revision 2012-03-22 21:07 UTC by mattficken@php.net

Patch bug48555 for Testing related Bug #61480

Patch version 2012-04-03 22:20 UTC

Return to Bug #61480 | Download this patch
Patch Revisions: 2012-04-03 22:20 UTC | 2012-03-22 21:07 UTC

Developer: mattficken@php.net

Line 1 (now 1), was 32 lines, now 29 lines
 --- C:/Users/v-mafick.REDMOND/Downloads/php-5.3-src-r324324/php-5.3-src-r324324/ext/gd/tests/bug48555.phpt	Tue Jul 28 12:16:02 2009
 +++ C:/php-sdk/php-5.3-src-r324324/ext/gd/tests/bug48555.phpt	Wed Mar 21 13:03:05 2012
 @@ -4,9 +4,20 @@
  <?php
  	if(!extension_loaded('gd')){ die('skip gd extension not available'); }
  	if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
 +	
 +	ob_start();
 +	phpinfo(INFO_MODULES);
 +	$info = ob_get_clean();
 +	
 +	preg_match("/FreeType Version => (\d+).(\d+).(\d+)/", $info, $m);
 +		
 +	if (!($m[1]>=2 && ($m[2]>4||($m[2]==4&&$m[3]>=3)))) {
 +		die('skip freetype version is too old. test requires FreeType 2.4.3 or higher');
 +	}
 +		
  ?>
  --FILE--
 -<?php
 +<?php		
 --- ext/gd/tests/bug48555.phpt	Thu Mar 29 10:38:00 2012
 +++ ext/gd/tests/bug48555.phpt	Tue Apr 03 11:20:53 2012
 @@ -10,10 +10,22 @@
   $cwd = dirname(__FILE__);
   $font = "$cwd/Tuffy.ttf";
   $box = ImageFTBBox(14, 0, $font, "Text without line-break");
 @@ -15,5 +26,5 @@
  echo 'Top with line-break: ' . $box[7] . "\n";
 -echo 'Top without line-break: ' . $box[7] . "\n";
 +//echo 'Top without line-break: ' . $box[7] . "\n";
 +$without_line_break = $box[7];
  $box = ImageFTBBox(14, 0, $font, "Text with\nline-break\none more");
 -echo 'Top with line-break: ' . $box[7] . "\n";
 +//echo 'Top with line-break: ' . $box[7] . "\n";
 +$with_line_break = $box[7];
 +
 +var_dump($without_line_break);
 +var_dump($with_line_break);
 +if ($with_line_break==$without_line_break) {
 +  echo "with line break == without line break".PHP_EOL;
 +} else {
 +  echo "with line break != without line break".PHP_EOL;	
 +}
 +
   ?>
   --EXPECTF--
  -Top without line-break: -14
  -Top with line-break: -14
 +Top without line-break: -15
 +Top with line-break: -15
 +int(-%d)
 +int(-%d)
 +with line break == without line break
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Sep 24 23:01:25 2018 UTC