Edit report at https://bugs.php.net/bug.php?id=65462&edit=1
ID: 65462 User updated by: neweracracker at gmail dot com Reported by: neweracracker at gmail dot com Summary: Please add tests for gregorian and jewish overflow fixes -Status: Feedback +Status: Open Type: Feature/Change Request Package: Calendar related Operating System: Irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: --TEST-- Request #65462 (tests for gregorian and jewish overflow fixes) --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo 'testing jdtojewish'."\n"; for ($i=324542840; $i<324542850; $i++) { echo $i.':'.jdtojewish($i)."\n"; } echo 'done'."\n"; echo 'testing jdtogregorian'."\n"; for ($i=536838860; $i<536838870; $i++) { echo $i.':'.jdtogregorian($i)."\n"; } echo 'done'."\n"; ?> --EXPECT-- testing jdtojewish 324542840:12/7/887605 324542841:12/8/887605 324542842:12/9/887605 324542843:12/10/887605 324542844:12/11/887605 324542845:12/12/887605 324542846:12/13/887605 324542847:0/0/0 324542848:0/0/0 324542849:0/0/0 done testing jdtogregorian 536838860:10/11/1465102 536838861:10/12/1465102 536838862:10/13/1465102 536838863:10/14/1465102 536838864:10/15/1465102 536838865:10/16/1465102 536838866:10/17/1465102 536838867:0/0/0 536838868:0/0/0 536838869:0/0/0 done Previous Comments: ------------------------------------------------------------------------ [2013-08-19 15:53:41] neweracracker at gmail dot com Related To: Bug #65462 ------------------------------------------------------------------------ [2013-08-18 06:04:54] s...@php.net Can you construct these in PHP's .phpt test format? See http://qa.php.net/write- test.php and http://qa.php.net/phpt_details.php Check existing tests to see how if anything special is required to make the tests run identically in all locales. ------------------------------------------------------------------------ [2013-08-17 03:26:18] neweracracker at gmail dot com Description: ------------ While backporting calendar fixes from PHP 5.3 to PHP 5.2 I noticed that there are two fixes which lack of tests and I'd like to have more tests added. Test script: --------------- php -r "for ($i=324542840; $i<324542850; $i++) echo $i.':'.jdtojewish($i).PHP_EOL;" 324542840:12/7/887605 324542841:12/8/887605 324542842:12/9/887605 324542843:12/10/887605 324542844:12/11/887605 324542845:12/12/887605 324542846:12/13/887605 324542847:0/0/0 324542848:0/0/0 324542849:0/0/0 php -r "for ($i=536838860; $i<536838870; $i++) echo $i.':'.jdtogregorian($i).PHP_EOL;" 536838860:10/11/1465102 536838861:10/12/1465102 536838862:10/13/1465102 536838863:10/14/1465102 536838864:10/15/1465102 536838865:10/16/1465102 536838866:10/17/1465102 536838867:0/0/0 536838868:0/0/0 536838869:0/0/0 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65462&edit=1