diff options
Diffstat (limited to 'ext/calendar/tests')
41 files changed, 80 insertions, 82 deletions
diff --git a/ext/calendar/tests/bug52744.phpt b/ext/calendar/tests/bug52744.phpt index 886086a294..99fd65f61b 100644 --- a/ext/calendar/tests/bug52744.phpt +++ b/ext/calendar/tests/bug52744.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #52744 (cal_days_in_month incorrect for December 1 BCE) ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php var_dump(cal_days_in_month(CAL_GREGORIAN, 12, -1)); diff --git a/ext/calendar/tests/bug53574_1.phpt b/ext/calendar/tests/bug53574_1.phpt index 6aba600619..c4a265f8f0 100644 --- a/ext/calendar/tests/bug53574_1.phpt +++ b/ext/calendar/tests/bug53574_1.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #53574 (Integer overflow in SdnToJulian; leads to segfault) +--EXTENSIONS-- +calendar --SKIPIF-- <?php -include 'skipif.inc'; if (PHP_INT_SIZE != 4) { die("skip this test is for 32bit platform only"); } diff --git a/ext/calendar/tests/bug53574_2.phpt b/ext/calendar/tests/bug53574_2.phpt index 6e3154a916..cbd4b7ad2c 100644 --- a/ext/calendar/tests/bug53574_2.phpt +++ b/ext/calendar/tests/bug53574_2.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #53574 (Integer overflow in SdnToJulian; leads to segfault) +--EXTENSIONS-- +calendar --SKIPIF-- <?php -include 'skipif.inc'; if (PHP_INT_SIZE == 4) { die("skip this test is for 64bit platform only"); } diff --git a/ext/calendar/tests/bug54254.phpt b/ext/calendar/tests/bug54254.phpt index f623fad809..8dced655bb 100644 --- a/ext/calendar/tests/bug54254.phpt +++ b/ext/calendar/tests/bug54254.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #54254 (cal_days_in_month incompatible with jdtojewish in non-leap-years) ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php var_dump(cal_days_in_month(CAL_JEWISH, 1, 5771)); diff --git a/ext/calendar/tests/bug55797_1.phpt b/ext/calendar/tests/bug55797_1.phpt index c9374c9d38..05880803d2 100644 --- a/ext/calendar/tests/bug55797_1.phpt +++ b/ext/calendar/tests/bug55797_1.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #55797: Integer overflow in SdnToGregorian leads to segfault (in optimized builds) +--EXTENSIONS-- +calendar --SKIPIF-- <?php -include 'skipif.inc'; if (PHP_INT_SIZE != 4) { die("skip this test is for 32bit platform only"); } diff --git a/ext/calendar/tests/bug55797_2.phpt b/ext/calendar/tests/bug55797_2.phpt index b60fd0eba4..7cbe88a139 100644 --- a/ext/calendar/tests/bug55797_2.phpt +++ b/ext/calendar/tests/bug55797_2.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #55797: Integer overflow in SdnToGregorian leads to segfault (in optimized builds) +--EXTENSIONS-- +calendar --SKIPIF-- <?php -include 'skipif.inc'; if (PHP_INT_SIZE == 4) { die("skip this test is for 64bit platform only"); } diff --git a/ext/calendar/tests/bug67976.phpt b/ext/calendar/tests/bug67976.phpt index 74e0bc81b1..1c8e56ad64 100644 --- a/ext/calendar/tests/bug67976.phpt +++ b/ext/calendar/tests/bug67976.phpt @@ -1,9 +1,7 @@ --TEST-- Bug #67976 (cal_days_month() fails for final month of the French calendar) ---SKIPIF-- -<?php -if (!extension_loaded('calendar')) die('skip ext/calendar required'); -?> +--EXTENSIONS-- +calendar --FILE-- <?php var_dump(cal_days_in_month(CAL_FRENCH, 13, 14)); diff --git a/ext/calendar/tests/bug71894.phpt b/ext/calendar/tests/bug71894.phpt index ea2d6004e7..c98c5a7808 100644 --- a/ext/calendar/tests/bug71894.phpt +++ b/ext/calendar/tests/bug71894.phpt @@ -1,9 +1,7 @@ --TEST-- Bug #71894 (AddressSanitizer: global-buffer-overflow in zif_cal_from_jd) ---SKIPIF-- -<?php -if (!extension_loaded('calendar')) die('skip ext/calendar required'); -?> +--EXTENSIONS-- +calendar --FILE-- <?php var_dump(cal_from_jd(347997, CAL_JEWISH)); diff --git a/ext/calendar/tests/bug80185.phpt b/ext/calendar/tests/bug80185.phpt index eab5cf1c4b..dfc843270e 100644 --- a/ext/calendar/tests/bug80185.phpt +++ b/ext/calendar/tests/bug80185.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #80185 (jdtounix() fails after 2037) +--EXTENSIONS-- +calendar --SKIPIF-- <?php -if (!extension_loaded('calendar')) die('skip ext/calendar required'); if (PHP_INT_SIZE != 8) die("skip for 64bit platforms only"); ?> --FILE-- diff --git a/ext/calendar/tests/bug80185_32bit.phpt b/ext/calendar/tests/bug80185_32bit.phpt index 98a1bea2a3..a7fe96e0ff 100644 --- a/ext/calendar/tests/bug80185_32bit.phpt +++ b/ext/calendar/tests/bug80185_32bit.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #80185 (jdtounix() fails after 2037) +--EXTENSIONS-- +calendar --SKIPIF-- <?php -if (!extension_loaded('calendar')) die('skip ext/calendar required'); if (PHP_INT_SIZE != 4) die("skip for 32bit platforms only"); ?> --FILE-- diff --git a/ext/calendar/tests/cal_days_in_month.phpt b/ext/calendar/tests/cal_days_in_month.phpt index fbd6362b0f..d94d39f2f6 100644 --- a/ext/calendar/tests/cal_days_in_month.phpt +++ b/ext/calendar/tests/cal_days_in_month.phpt @@ -1,7 +1,7 @@ --TEST-- cal_days_in_month() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php $num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); diff --git a/ext/calendar/tests/cal_days_in_month_error1.phpt b/ext/calendar/tests/cal_days_in_month_error1.phpt index 2b7ee0ea88..f334888479 100644 --- a/ext/calendar/tests/cal_days_in_month_error1.phpt +++ b/ext/calendar/tests/cal_days_in_month_error1.phpt @@ -2,8 +2,8 @@ Test cal_days_in_month() function : error conditions --CREDITS-- edgarsandi - <edgar.r.sandi@gmail.com> ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php try { diff --git a/ext/calendar/tests/cal_from_jd.phpt b/ext/calendar/tests/cal_from_jd.phpt index 9614522a05..4b2e27e9ab 100644 --- a/ext/calendar/tests/cal_from_jd.phpt +++ b/ext/calendar/tests/cal_from_jd.phpt @@ -1,7 +1,7 @@ --TEST-- cal_from_jd() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php print_r(cal_from_jd(1748326, CAL_GREGORIAN)); diff --git a/ext/calendar/tests/cal_from_jd_error1.phpt b/ext/calendar/tests/cal_from_jd_error1.phpt index feafe240b5..3b4e11b835 100644 --- a/ext/calendar/tests/cal_from_jd_error1.phpt +++ b/ext/calendar/tests/cal_from_jd_error1.phpt @@ -2,8 +2,8 @@ Test cal_from_jd() function : error conditions --CREDITS-- edgarsandi - <edgar.r.sandi@gmail.com> ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php try { diff --git a/ext/calendar/tests/cal_info.phpt b/ext/calendar/tests/cal_info.phpt index 0d4b823486..18884917e5 100644 --- a/ext/calendar/tests/cal_info.phpt +++ b/ext/calendar/tests/cal_info.phpt @@ -2,8 +2,8 @@ cal_info() --INI-- date.timezone=UTC ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php print_r(cal_info()); diff --git a/ext/calendar/tests/cal_to_jd.phpt b/ext/calendar/tests/cal_to_jd.phpt index fde1e0b455..cfcc5904b3 100644 --- a/ext/calendar/tests/cal_to_jd.phpt +++ b/ext/calendar/tests/cal_to_jd.phpt @@ -1,7 +1,7 @@ --TEST-- cal_to_jd() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo cal_to_jd(CAL_GREGORIAN, 8, 26, 74), "\n"; diff --git a/ext/calendar/tests/cal_to_jd_error1.phpt b/ext/calendar/tests/cal_to_jd_error1.phpt index b8585c7f05..1cef36af69 100644 --- a/ext/calendar/tests/cal_to_jd_error1.phpt +++ b/ext/calendar/tests/cal_to_jd_error1.phpt @@ -2,8 +2,8 @@ Test cal_to_jd() function : error conditions --CREDITS-- edgarsandi - <edgar.r.sandi@gmail.com> ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php try { diff --git a/ext/calendar/tests/easter_date.phpt b/ext/calendar/tests/easter_date.phpt index c784f02ebd..a41c310de9 100644 --- a/ext/calendar/tests/easter_date.phpt +++ b/ext/calendar/tests/easter_date.phpt @@ -4,8 +4,8 @@ easter_date() date.timezone=UTC --ENV-- TZ=UTC ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php putenv('TZ=UTC'); diff --git a/ext/calendar/tests/easter_days.phpt b/ext/calendar/tests/easter_days.phpt index 04aa7ae11b..56ca7eaeb5 100644 --- a/ext/calendar/tests/easter_days.phpt +++ b/ext/calendar/tests/easter_days.phpt @@ -1,7 +1,7 @@ --TEST-- easter_days() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo easter_days(1999), "\n"; diff --git a/ext/calendar/tests/frenchtojd.phpt b/ext/calendar/tests/frenchtojd.phpt index 73addb6b80..ca63789afe 100644 --- a/ext/calendar/tests/frenchtojd.phpt +++ b/ext/calendar/tests/frenchtojd.phpt @@ -1,7 +1,7 @@ --TEST-- frenchtojd() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo frenchtojd(-1,-1,-1), "\n"; diff --git a/ext/calendar/tests/gregoriantojd.phpt b/ext/calendar/tests/gregoriantojd.phpt index aeecb3af51..9210aab036 100644 --- a/ext/calendar/tests/gregoriantojd.phpt +++ b/ext/calendar/tests/gregoriantojd.phpt @@ -1,7 +1,7 @@ --TEST-- gregoriantojd() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo gregoriantojd( 0, 0, 0). "\n"; diff --git a/ext/calendar/tests/gregoriantojd_overflow.phpt b/ext/calendar/tests/gregoriantojd_overflow.phpt index 8cb4796e5c..f75aec7222 100644 --- a/ext/calendar/tests/gregoriantojd_overflow.phpt +++ b/ext/calendar/tests/gregoriantojd_overflow.phpt @@ -1,8 +1,9 @@ --TEST-- gregoriantojd() +--EXTENSIONS-- +calendar --SKIPIF-- <?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?> -<?php include 'skipif.inc'; ?> --FILE-- <?php echo gregoriantojd(5, 5, 6000000) . "\n"; diff --git a/ext/calendar/tests/jddayofweek.phpt b/ext/calendar/tests/jddayofweek.phpt index 0f3ca8a3f8..d3a5e90706 100644 --- a/ext/calendar/tests/jddayofweek.phpt +++ b/ext/calendar/tests/jddayofweek.phpt @@ -1,7 +1,7 @@ --TEST-- jddayofweek() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php foreach (array(2440588, 2452162, 2453926, -1000) as $jd) { diff --git a/ext/calendar/tests/jdmonthname.phpt b/ext/calendar/tests/jdmonthname.phpt index 07ed1161b1..3405f4100a 100644 --- a/ext/calendar/tests/jdmonthname.phpt +++ b/ext/calendar/tests/jdmonthname.phpt @@ -1,7 +1,7 @@ --TEST-- jdmonthname() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php foreach (array(2440588, 2452162, 2453926) as $jd) { diff --git a/ext/calendar/tests/jdtofrench.phpt b/ext/calendar/tests/jdtofrench.phpt index 2601d14a07..232f4ee97e 100644 --- a/ext/calendar/tests/jdtofrench.phpt +++ b/ext/calendar/tests/jdtofrench.phpt @@ -1,7 +1,7 @@ --TEST-- jdtofrench() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo jdtofrench(0). "\n"; diff --git a/ext/calendar/tests/jdtogregorian.phpt b/ext/calendar/tests/jdtogregorian.phpt index e8bf4a49aa..b04309219b 100644 --- a/ext/calendar/tests/jdtogregorian.phpt +++ b/ext/calendar/tests/jdtogregorian.phpt @@ -1,7 +1,7 @@ --TEST-- jdtogregorian() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo jdtogregorian(0). "\n"; diff --git a/ext/calendar/tests/jdtogregorian_overflow.phpt b/ext/calendar/tests/jdtogregorian_overflow.phpt index 9d4a1d6b4d..782e32797b 100644 --- a/ext/calendar/tests/jdtogregorian_overflow.phpt +++ b/ext/calendar/tests/jdtogregorian_overflow.phpt @@ -2,9 +2,10 @@ jdtogregorian(): test overflow --CREDITS-- neweracracker@gmail.com +--EXTENSIONS-- +calendar --SKIPIF-- <?php -if (!extension_loaded('calendar')) die('skip ext/calendar required'); if (PHP_INT_SIZE != 4) die('skip this test is for 32bit platforms only'); ?> --FILE-- diff --git a/ext/calendar/tests/jdtojewish.phpt b/ext/calendar/tests/jdtojewish.phpt index 4fd104c50c..6b1c2e3f77 100644 --- a/ext/calendar/tests/jdtojewish.phpt +++ b/ext/calendar/tests/jdtojewish.phpt @@ -1,7 +1,7 @@ --TEST-- jdtojewish() function ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php diff --git a/ext/calendar/tests/jdtojewish64.phpt b/ext/calendar/tests/jdtojewish64.phpt index da1e7f74c8..5f36558ee1 100644 --- a/ext/calendar/tests/jdtojewish64.phpt +++ b/ext/calendar/tests/jdtojewish64.phpt @@ -1,8 +1,9 @@ --TEST-- Bug #64895: Integer overflow in SndToJewish +--EXTENSIONS-- +calendar --SKIPIF-- <?php -include 'skipif.inc'; if (PHP_INT_SIZE == 4) { die("skip this test is for 64bit platform only"); } diff --git a/ext/calendar/tests/jdtojewish_hebrew.phpt b/ext/calendar/tests/jdtojewish_hebrew.phpt index f7df0358f7..ceb53c219e 100644 --- a/ext/calendar/tests/jdtojewish_hebrew.phpt +++ b/ext/calendar/tests/jdtojewish_hebrew.phpt @@ -1,9 +1,7 @@ --TEST-- Test all hebrew month names ---SKIPIF-- -<?php -if (!extension_loaded('calendar')) die('skip calendar extension not available'); -?> +--EXTENSIONS-- +calendar --FILE-- <?php for ($year = 5000; $year <= 5001; $year++) { diff --git a/ext/calendar/tests/jdtojewish_overflow.phpt b/ext/calendar/tests/jdtojewish_overflow.phpt index 17a47e06e1..a3d8ba46f5 100644 --- a/ext/calendar/tests/jdtojewish_overflow.phpt +++ b/ext/calendar/tests/jdtojewish_overflow.phpt @@ -2,10 +2,8 @@ jdtojewish(): test overflow --CREDITS-- neweracracker@gmail.com ---SKIPIF-- -<?php -if (!extension_loaded('calendar')) die('skip ext/calendar required'); -?> +--EXTENSIONS-- +calendar --FILE-- <?php for ($i=324542840; $i<324542850; $i++) { diff --git a/ext/calendar/tests/jdtojulian.phpt b/ext/calendar/tests/jdtojulian.phpt index f4082e76ec..b13906b777 100644 --- a/ext/calendar/tests/jdtojulian.phpt +++ b/ext/calendar/tests/jdtojulian.phpt @@ -1,7 +1,7 @@ --TEST-- jdtojulian() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo jdtojulian(0). "\n"; diff --git a/ext/calendar/tests/jdtomonthname.phpt b/ext/calendar/tests/jdtomonthname.phpt index fb70067bbe..23c970cfa7 100644 --- a/ext/calendar/tests/jdtomonthname.phpt +++ b/ext/calendar/tests/jdtomonthname.phpt @@ -1,7 +1,7 @@ --TEST-- jdtomonthname() test ---SKIPIF-- -<?php if (!extension_loaded("calendar")) print "skip"; ?> +--EXTENSIONS-- +calendar --FILE-- <?php diff --git a/ext/calendar/tests/jdtounix.phpt b/ext/calendar/tests/jdtounix.phpt index 8d85543300..f9da430c54 100644 --- a/ext/calendar/tests/jdtounix.phpt +++ b/ext/calendar/tests/jdtounix.phpt @@ -2,8 +2,8 @@ jdtounix() --INI-- date.timezone=UTC ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo date("Y-m-d",jdtounix(2440588)). "\n"; diff --git a/ext/calendar/tests/jdtounix_error1.phpt b/ext/calendar/tests/jdtounix_error1.phpt index ba85958ec8..0032e376db 100644 --- a/ext/calendar/tests/jdtounix_error1.phpt +++ b/ext/calendar/tests/jdtounix_error1.phpt @@ -4,8 +4,8 @@ Test jdtounix() function : error conditions edgarsandi - <edgar.r.sandi@gmail.com> --INI-- date.timezone=UTC ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php try { diff --git a/ext/calendar/tests/jewishtojd.phpt b/ext/calendar/tests/jewishtojd.phpt index 2dd0381619..174a860729 100644 --- a/ext/calendar/tests/jewishtojd.phpt +++ b/ext/calendar/tests/jewishtojd.phpt @@ -1,7 +1,7 @@ --TEST-- jewishtojd() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo jewishtojd(-1,-1,-1). "\n"; diff --git a/ext/calendar/tests/juliantojd.phpt b/ext/calendar/tests/juliantojd.phpt index 2f65d84f36..19a6b27048 100644 --- a/ext/calendar/tests/juliantojd.phpt +++ b/ext/calendar/tests/juliantojd.phpt @@ -1,7 +1,7 @@ --TEST-- juliantojd() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --FILE-- <?php echo juliantojd( 0, 0, 0). "\n"; diff --git a/ext/calendar/tests/juliantojd_overflow.phpt b/ext/calendar/tests/juliantojd_overflow.phpt index fb04c95495..cdf1b203d9 100644 --- a/ext/calendar/tests/juliantojd_overflow.phpt +++ b/ext/calendar/tests/juliantojd_overflow.phpt @@ -1,8 +1,9 @@ --TEST-- juliantojd() +--EXTENSIONS-- +calendar --SKIPIF-- <?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?> -<?php include 'skipif.inc'; ?> --FILE-- <?php echo juliantojd(5, 5, 6000000000) . "\n"; diff --git a/ext/calendar/tests/skipif.inc b/ext/calendar/tests/skipif.inc deleted file mode 100644 index e867fafd29..0000000000 --- a/ext/calendar/tests/skipif.inc +++ /dev/null @@ -1,4 +0,0 @@ -<?php -if(!extension_loaded("calendar")) - print "skip - CALENDAR extension not available"; -?> diff --git a/ext/calendar/tests/unixtojd.phpt b/ext/calendar/tests/unixtojd.phpt index 28a05c0c6f..3d0ffa3fea 100644 --- a/ext/calendar/tests/unixtojd.phpt +++ b/ext/calendar/tests/unixtojd.phpt @@ -1,7 +1,7 @@ --TEST-- unixtojd() ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --ENV-- TZ=UTC --FILE-- diff --git a/ext/calendar/tests/unixtojd_error1.phpt b/ext/calendar/tests/unixtojd_error1.phpt index 000f047f0a..6b8fad05eb 100644 --- a/ext/calendar/tests/unixtojd_error1.phpt +++ b/ext/calendar/tests/unixtojd_error1.phpt @@ -2,8 +2,8 @@ Test unixtojd() function : error conditions --CREDITS-- edgarsandi - <edgar.r.sandi@gmail.com> ---SKIPIF-- -<?php include 'skipif.inc'; ?> +--EXTENSIONS-- +calendar --INI-- date.timezone=UTC --FILE-- |