From ced39e31684f5df22e070237ac7b25fcd0418a77 Mon Sep 17 00:00:00 2001 From: Rathna N Date: Thu, 27 Oct 2005 11:05:50 +0000 Subject: [PATCH] Tests for calendar extension --- ext/calendar/tests/cal_days_in_month.phpt | 23 +++++++++++++++++++++++ ext/calendar/tests/cal_to_jd.phpt | 16 ++++++++++++++++ ext/calendar/tests/easter_days.phpt | 14 ++++++++++++++ ext/calendar/tests/frenchtojd.phpt | 16 ++++++++++++++++ ext/calendar/tests/skipif.inc | 16 ++++++++++++++++ 5 files changed, 85 insertions(+) create mode 100644 ext/calendar/tests/cal_days_in_month.phpt create mode 100644 ext/calendar/tests/cal_to_jd.phpt create mode 100644 ext/calendar/tests/easter_days.phpt create mode 100644 ext/calendar/tests/frenchtojd.phpt create mode 100644 ext/calendar/tests/skipif.inc diff --git a/ext/calendar/tests/cal_days_in_month.phpt b/ext/calendar/tests/cal_days_in_month.phpt new file mode 100644 index 0000000000..71fe98f0b7 --- /dev/null +++ b/ext/calendar/tests/cal_days_in_month.phpt @@ -0,0 +1,23 @@ +--TEST-- +cal_days_in_month() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +There are 31 days in August 2003 +There are 28 days in February 2003 +There are 29 days in February 2004 +There are 990210 days in -1, -2003 +There are 31 days in December 2034 diff --git a/ext/calendar/tests/cal_to_jd.phpt b/ext/calendar/tests/cal_to_jd.phpt new file mode 100644 index 0000000000..fde1e0b455 --- /dev/null +++ b/ext/calendar/tests/cal_to_jd.phpt @@ -0,0 +1,16 @@ +--TEST-- +cal_to_jd() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +1748326 +1748324 +374867 +0 diff --git a/ext/calendar/tests/easter_days.phpt b/ext/calendar/tests/easter_days.phpt new file mode 100644 index 0000000000..04aa7ae11b --- /dev/null +++ b/ext/calendar/tests/easter_days.phpt @@ -0,0 +1,14 @@ +--TEST-- +easter_days() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +14 +32 +2 diff --git a/ext/calendar/tests/frenchtojd.phpt b/ext/calendar/tests/frenchtojd.phpt new file mode 100644 index 0000000000..73addb6b80 --- /dev/null +++ b/ext/calendar/tests/frenchtojd.phpt @@ -0,0 +1,16 @@ +--TEST-- +frenchtojd() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +0 +0 +2375840 +0 diff --git a/ext/calendar/tests/skipif.inc b/ext/calendar/tests/skipif.inc new file mode 100644 index 0000000000..fbc18a41e0 --- /dev/null +++ b/ext/calendar/tests/skipif.inc @@ -0,0 +1,16 @@ + + + + -- 2.40.0