helly           Sun Nov  6 07:27:11 2005 EDT

  Modified files:              
    /php-src/ext/calendar/tests cal_days_in_month.phpt cal_to_jd.phpt 
                                easter_days.phpt frenchtojd.phpt 
                                skipif.inc 
  Log:
  - MFB Add tests
  
  
http://cvs.php.net/diff.php/php-src/ext/calendar/tests/cal_days_in_month.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/calendar/tests/cal_days_in_month.phpt
diff -u /dev/null php-src/ext/calendar/tests/cal_days_in_month.phpt:1.2
--- /dev/null   Sun Nov  6 07:27:11 2005
+++ php-src/ext/calendar/tests/cal_days_in_month.phpt   Sun Nov  6 07:27:11 2005
@@ -0,0 +1,20 @@
+--TEST--
+cal_days_in_month()
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); 
+echo "There are $num days in August 2003\n";
+$num = cal_days_in_month(CAL_GREGORIAN, 2, 2003); 
+echo "There are $num days in February 2003\n";
+$num = cal_days_in_month(CAL_GREGORIAN, 2, 2004); 
+echo "There are $num days in February 2004\n";
+$num = cal_days_in_month(CAL_GREGORIAN, 12, 2034); 
+echo "There are $num days in December 2034\n";
+?>
+--EXPECT--
+There are 31 days in August 2003
+There are 28 days in February 2003
+There are 29 days in February 2004
+There are 31 days in December 2034
http://cvs.php.net/diff.php/php-src/ext/calendar/tests/cal_to_jd.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/calendar/tests/cal_to_jd.phpt
diff -u /dev/null php-src/ext/calendar/tests/cal_to_jd.phpt:1.2
--- /dev/null   Sun Nov  6 07:27:11 2005
+++ php-src/ext/calendar/tests/cal_to_jd.phpt   Sun Nov  6 07:27:11 2005
@@ -0,0 +1,16 @@
+--TEST--
+cal_to_jd()
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+echo cal_to_jd(CAL_GREGORIAN, 8, 26, 74), "\n";
+echo cal_to_jd(CAL_JULIAN, 8, 26, 74), "\n";
+echo cal_to_jd(CAL_JEWISH, 8, 26, 74), "\n";
+echo cal_to_jd(CAL_FRENCH, 8, 26, 74), "\n";
+?>
+--EXPECT--
+1748326
+1748324
+374867
+0
http://cvs.php.net/diff.php/php-src/ext/calendar/tests/easter_days.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/calendar/tests/easter_days.phpt
diff -u /dev/null php-src/ext/calendar/tests/easter_days.phpt:1.2
--- /dev/null   Sun Nov  6 07:27:11 2005
+++ php-src/ext/calendar/tests/easter_days.phpt Sun Nov  6 07:27:11 2005
@@ -0,0 +1,14 @@
+--TEST--
+easter_days()
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+echo easter_days(1999), "\n";
+echo easter_days(1492), "\n";
+echo easter_days(1913), "\n";
+?>
+--EXPECT--
+14
+32
+2
http://cvs.php.net/diff.php/php-src/ext/calendar/tests/frenchtojd.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/calendar/tests/frenchtojd.phpt
diff -u /dev/null php-src/ext/calendar/tests/frenchtojd.phpt:1.2
--- /dev/null   Sun Nov  6 07:27:11 2005
+++ php-src/ext/calendar/tests/frenchtojd.phpt  Sun Nov  6 07:27:11 2005
@@ -0,0 +1,16 @@
+--TEST--
+frenchtojd()
+--SKIPIF--
+<?php include 'skipif.inc'; ?>
+--FILE--
+<?php
+echo frenchtojd(-1,-1,-1), "\n";
+echo frenchtojd(0,0,0), "\n";
+echo frenchtojd(1,1,1), "\n";
+echo frenchtojd(14,31,15), "\n";
+?>
+--EXPECT--
+0
+0
+2375840
+0
http://cvs.php.net/diff.php/php-src/ext/calendar/tests/skipif.inc?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/calendar/tests/skipif.inc
diff -u /dev/null php-src/ext/calendar/tests/skipif.inc:1.2
--- /dev/null   Sun Nov  6 07:27:11 2005
+++ php-src/ext/calendar/tests/skipif.inc       Sun Nov  6 07:27:11 2005
@@ -0,0 +1,4 @@
+<?php 
+if(!extension_loaded("calendar")) 
+       print "skip - CALENDAR extension not available"; 
+?>

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

Reply via email to