jani                                     Thu, 23 Jul 2009 19:06:56 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=284665

Log:
- Fixed tests to be more portable

Changed paths:
    U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation2.phpt
    U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt
    U   
php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation8.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation2.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation5.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation8.phpt

Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation2.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation2.phpt	2009-07-23 17:39:21 UTC (rev 284664)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation2.phpt	2009-07-23 19:06:56 UTC (rev 284665)
@@ -35,10 +35,10 @@
   // float data
   10.5,
   -10.5,
-  10.1234567e10,
-  10.7654321E-10,
+  (float) PHP_INT_MAX + 1,
+  (float) -PHP_INT_MAX - 1,
   .5,
-
+
   // array data
   array(),
   array(0),
@@ -95,23 +95,23 @@
 string(28) "This is ch*uklen vari*ation*"
 -- Iteration 2 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 3 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 4 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 5 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 6 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 7 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
@@ -123,52 +123,52 @@
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 11 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 12 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 13 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 14 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 15 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 16 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 17 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 18 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 19 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 20 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 21 --

-Notice: Object of class MyClass could not be converted to int in %s on line %d
+Notice: Object of class MyClass could not be converted to int in %schunk_split_variation2.php on line %d
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 22 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 23 --

-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 24 --
-string(%d) "%s"
-Done
\ No newline at end of file
+string(30) "This *is ch*uklen* vari*ation*"
+Done

Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt	2009-07-23 17:39:21 UTC (rev 284664)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation5.phpt	2009-07-23 19:06:56 UTC (rev 284665)
@@ -26,15 +26,15 @@
   -123,  //negative integer
   0234,  //octal number
   0x1A,  //hexadecimal number
-  2147483647,  //max positive integer number
-  2147483648,  //max positive integer+1
-  -2147483648,  //min negative integer
+  PHP_INT_MAX,  //max positive integer number
+  PHP_INT_MAX * 3,  //integer overflow
+  -PHP_INT_MAX - 1,  //min negative integer

 );

 for($count = 0; $count < count($values); $count++) {
   echo "-- Iteration $count --\n";
-  var_dump( chunk_split($str, $values[$count], $ending) );
+  var_dump(chunk_split($str, $values[$count], $ending) );
 }

 echo "Done"

Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation8.phpt
===================================================================
--- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation8.phpt	2009-07-23 17:39:21 UTC (rev 284664)
+++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/chunk_split_variation8.phpt	2009-07-23 19:06:56 UTC (rev 284665)
@@ -32,9 +32,9 @@
   -123,  //negative integer
   0234,  //octal number
   0x1A,  //hexadecimal number
-  2147483647,  //max positive integer number
-  2147483648,  //max positive integer+1
-  -2147483648,  //min negative integer
+  PHP_INT_MAX,      // max positive integer number
+  PHP_INT_MAX * 3,  // integer overflow
+  -PHP_INT_MAX - 1, // min negative integer

 );


Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation2.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation2.phpt	2009-07-23 17:39:21 UTC (rev 284664)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation2.phpt	2009-07-23 19:06:56 UTC (rev 284665)
@@ -35,10 +35,10 @@
   // float data
   10.5,
   -10.5,
-  10.1234567e10,
-  10.7654321E-10,
+  (float) PHP_INT_MAX + 1,
+  (float) -PHP_INT_MAX - 1,
   .5,
-
+
   // array data
   array(),
   array(0),

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation5.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation5.phpt	2009-07-23 17:39:21 UTC (rev 284664)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation5.phpt	2009-07-23 19:06:56 UTC (rev 284665)
@@ -27,8 +27,8 @@
   0234,  //octal number
   0x1A,  //hexadecimal number
   PHP_INT_MAX,  //max positive integer number
-  PHP_INT_MAX*3,  //integer overflow
-  -PHP_INT_MAX -1,  //min negative integer
+  PHP_INT_MAX * 3,  //integer overflow
+  -PHP_INT_MAX - 1,  //min negative integer

 );

@@ -62,8 +62,9 @@
 string(73) "This contains	and special char & numbers 123.
 It also checks for  char||"
 -- Iteration 6 --
-string(73) "This contains	and special char & numbers 123.
-It also checks for  char||"
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
 -- Iteration 7 --

 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation8.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation8.phpt	2009-07-23 17:39:21 UTC (rev 284664)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/chunk_split_variation8.phpt	2009-07-23 19:06:56 UTC (rev 284665)
@@ -32,9 +32,9 @@
   -123,  //negative integer
   0234,  //octal number
   0x1A,  //hexadecimal number
-  PHP_INT_MAX,  //max positive integer number
-  PHP_INT_MAX * 3,  // Will overflow 32 bits on 32 bt system and 64 bits on 64 bit system
-  -PHP_INT_MAX -1,  //min negative integer
+  PHP_INT_MAX,      // max positive integer number
+  PHP_INT_MAX * 3,  // integer overflow
+  -PHP_INT_MAX - 1, // min negative integer

 );

@@ -78,10 +78,9 @@
 It has _sp...@l c...@r$ 2222 !!!Now \k as escape char to test
 chunk_split():::"
 -- Iteration 7 --
-string(129) "This's heredoc string with 	 and
- white space char.
-It has _sp...@l c...@r$ 2222 !!!Now \k as escape char to test
-chunk_split():::"
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
 -- Iteration 8 --

 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to