Commit:    ec790753948d190db354cbce97786b4a1aac63fc
Author:    Anatol Belski <a...@php.net>         Mon, 10 Jun 2013 22:49:30 +0200
Parents:   84e35fb2e0fcd7400d289e06395c975fc7a77816
Branches:  PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=ec790753948d190db354cbce97786b4a1aac63fc

Log:
split the test for 32 and 64 bit

Changed paths:
  M  ext/date/tests/bug53437_var3.phpt
  A  ext/date/tests/bug53437_var5.phpt


Diff:
diff --git a/ext/date/tests/bug53437_var3.phpt 
b/ext/date/tests/bug53437_var3.phpt
index da7d0bd..537462e 100644
--- a/ext/date/tests/bug53437_var3.phpt
+++ b/ext/date/tests/bug53437_var3.phpt
@@ -1,5 +1,10 @@
 --TEST--
-Bug #53437 DateInterval unserialize bad data
+Bug #53437 DateInterval unserialize bad data, 32 bit
+--SKIPIF--
+<?php
+       if (PHP_INT_SIZE != 4) {
+               die('skip 32 bit only');
+       }
 --FILE--
 <?php
 $s = 
'O:12:"DateInterval":15:{s:1:"y";s:1:"2";s:1:"m";s:1:"0";s:1:"d";s:3:"bla";s:1:"h";s:1:"6";s:1:"i";s:1:"8";s:1:"s";s:1:"0";s:7:"weekday";i:10;s:16:"weekday_behavior";i:10;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";s:4:"aoeu";s:12:"special_type";i:0;s:14:"special_amount";s:21:"234523452345234532455";s:21:"have_weekday_relative";i:21474836489;s:21:"have_special_relative";s:3:"bla";}';
diff --git a/ext/date/tests/bug53437_var5.phpt 
b/ext/date/tests/bug53437_var5.phpt
new file mode 100644
index 0000000..61a7f55
--- /dev/null
+++ b/ext/date/tests/bug53437_var5.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Bug #53437 DateInterval unserialize bad data, 64 bit
+--SKIPIF--
+<?php
+       if (PHP_INT_SIZE != 8) {
+               die('skip true 64 bit only');
+       }
+--FILE--
+<?php
+$s = 
'O:12:"DateInterval":15:{s:1:"y";s:1:"2";s:1:"m";s:1:"0";s:1:"d";s:3:"bla";s:1:"h";s:1:"6";s:1:"i";s:1:"8";s:1:"s";s:1:"0";s:7:"weekday";i:10;s:16:"weekday_behavior";i:10;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";s:4:"aoeu";s:12:"special_type";i:0;s:14:"special_amount";s:21:"234523452345234532455";s:21:"have_weekday_relative";i:21474836489;s:21:"have_special_relative";s:3:"bla";}';
+
+$di = unserialize($s);
+var_dump($di);
+
+?>
+==DONE==
+--EXPECT--
+object(DateInterval)#1 (15) {
+  ["y"]=>
+  int(2)
+  ["m"]=>
+  int(0)
+  ["d"]=>
+  int(0)
+  ["h"]=>
+  int(6)
+  ["i"]=>
+  int(8)
+  ["s"]=>
+  int(0)
+  ["weekday"]=>
+  int(10)
+  ["weekday_behavior"]=>
+  int(10)
+  ["first_last_day_of"]=>
+  int(0)
+  ["invert"]=>
+  int(0)
+  ["days"]=>
+  int(0)
+  ["special_type"]=>
+  int(0)
+  ["special_amount"]=>
+  int(9223372036854775807)
+  ["have_weekday_relative"]=>
+  int(9)
+  ["have_special_relative"]=>
+  int(0)
+}
+==DONE==


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to