summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2007-10-10 14:34:38 +0000
committerDaniel Veillard <veillard@src.gnome.org>2007-10-10 14:34:38 +0000
commitc21fe206b08ec948a70edcd24ba5030d7634fab9 (patch)
tree600f1a523f4ab1c6c1a425d80af6bd661f4ac2a6 /tests
parente513120fb960095941b394f30461df18b81ff9f6 (diff)
downloadlibxslt-c21fe206b08ec948a70edcd24ba5030d7634fab9.tar.gz
libxslt-c21fe206b08ec948a70edcd24ba5030d7634fab9.tar.bz2
libxslt-c21fe206b08ec948a70edcd24ba5030d7634fab9.zip
applied patch from Maurice van der Pot to fix EXSLT week-in-year extenson
* libexslt/date.c tests/exslt/date/datetime.1.out tests/exslt/date/date.1.out tests/exslt/date/date.1.xml: applied patch from Maurice van der Pot to fix EXSLT week-in-year extenson which was not conforming to the definition. This also changes the output of the tests a bit. Should fix #452876 Daniel svn path=/trunk/; revision=1446
Diffstat (limited to 'tests')
-rw-r--r--tests/exslt/date/date.1.out96
-rw-r--r--tests/exslt/date/date.1.xml25
-rw-r--r--tests/exslt/date/datetime.1.out8
3 files changed, 112 insertions, 17 deletions
diff --git a/tests/exslt/date/date.1.out b/tests/exslt/date/date.1.out
index d301e029..f22546c5 100644
--- a/tests/exslt/date/date.1.out
+++ b/tests/exslt/date/date.1.out
@@ -7,7 +7,7 @@
month-in-year : 12
month-name : December
month-abbreviation : Dec
- week-in-year : 53
+ week-in-year : 1
day-in-year : 365
day-in-month : 31
day-of-week-in-month : 5
@@ -61,7 +61,7 @@
month-in-year : 12
month-name : December
month-abbreviation : Dec
- week-in-year : 53
+ week-in-year : 1
day-in-year : 365
day-in-month : 31
day-of-week-in-month : 5
@@ -79,7 +79,7 @@
month-in-year : 2
month-name : February
month-abbreviation : Feb
- week-in-year : 10
+ week-in-year : 9
day-in-year : 60
day-in-month : 29
day-of-week-in-month : 5
@@ -90,3 +90,93 @@
hour-in-day : NaN
minute-in-hour : NaN
second-in-minute : NaN
+
+ Test Date : 1999-01-02
+ year : 1999
+ leap-year : false
+ month-in-year : 1
+ month-name : January
+ month-abbreviation : Jan
+ week-in-year : 53
+ day-in-year : 2
+ day-in-month : 2
+ day-of-week-in-month : 1
+ day-in-week : 7
+ day-name : Saturday
+ day-abbreviation : Sat
+ time :
+ hour-in-day : NaN
+ minute-in-hour : NaN
+ second-in-minute : NaN
+
+ Test Date : 1999-01-03
+ year : 1999
+ leap-year : false
+ month-in-year : 1
+ month-name : January
+ month-abbreviation : Jan
+ week-in-year : 53
+ day-in-year : 3
+ day-in-month : 3
+ day-of-week-in-month : 1
+ day-in-week : 1
+ day-name : Sunday
+ day-abbreviation : Sun
+ time :
+ hour-in-day : NaN
+ minute-in-hour : NaN
+ second-in-minute : NaN
+
+ Test Date : 2004-01-01
+ year : 2004
+ leap-year : true
+ month-in-year : 1
+ month-name : January
+ month-abbreviation : Jan
+ week-in-year : 1
+ day-in-year : 1
+ day-in-month : 1
+ day-of-week-in-month : 1
+ day-in-week : 5
+ day-name : Thursday
+ day-abbreviation : Thu
+ time :
+ hour-in-day : NaN
+ minute-in-hour : NaN
+ second-in-minute : NaN
+
+ Test Date : 2006-01-01
+ year : 2006
+ leap-year : false
+ month-in-year : 1
+ month-name : January
+ month-abbreviation : Jan
+ week-in-year : 52
+ day-in-year : 1
+ day-in-month : 1
+ day-of-week-in-month : 1
+ day-in-week : 1
+ day-name : Sunday
+ day-abbreviation : Sun
+ time :
+ hour-in-day : NaN
+ minute-in-hour : NaN
+ second-in-minute : NaN
+
+ Test Date : 2007-12-31
+ year : 2007
+ leap-year : false
+ month-in-year : 12
+ month-name : December
+ month-abbreviation : Dec
+ week-in-year : 1
+ day-in-year : 365
+ day-in-month : 31
+ day-of-week-in-month : 5
+ day-in-week : 2
+ day-name : Monday
+ day-abbreviation : Mon
+ time :
+ hour-in-day : NaN
+ minute-in-hour : NaN
+ second-in-minute : NaN
diff --git a/tests/exslt/date/date.1.xml b/tests/exslt/date/date.1.xml
index 0d9c8eb7..562e08e8 100644
--- a/tests/exslt/date/date.1.xml
+++ b/tests/exslt/date/date.1.xml
@@ -1,10 +1,15 @@
-<?xml version="1.0"?>
-<page>
- <!-- valid xs:date -->
- <date date="0001-12-31Z"/>
- <date date="3000-01-31"/>
- <date date="2000-02-29"/>
- <date date="9990001-12-31Z"/>
- <date date="-0004-02-29"/>
-</page>
-
+<?xml version="1.0"?>
+<page>
+ <!-- valid xs:date -->
+ <date date="0001-12-31Z"/>
+ <date date="3000-01-31"/>
+ <date date="2000-02-29"/>
+ <date date="9990001-12-31Z"/>
+ <date date="-0004-02-29"/>
+ <date date="1999-01-02"/>
+ <date date="1999-01-03"/>
+ <date date="2004-01-01"/>
+ <date date="2006-01-01"/>
+ <date date="2007-12-31"/>
+</page>
+
diff --git a/tests/exslt/date/datetime.1.out b/tests/exslt/date/datetime.1.out
index 2eadb08e..c0b4c537 100644
--- a/tests/exslt/date/datetime.1.out
+++ b/tests/exslt/date/datetime.1.out
@@ -25,7 +25,7 @@
month-in-year : 12
month-name : December
month-abbreviation : Dec
- week-in-year : 53
+ week-in-year : 1
day-in-year : 365
day-in-month : 31
day-of-week-in-month : 5
@@ -43,7 +43,7 @@
month-in-year : 12
month-name : December
month-abbreviation : Dec
- week-in-year : 53
+ week-in-year : 52
day-in-year : 365
day-in-month : 31
day-of-week-in-month : 5
@@ -61,7 +61,7 @@
month-in-year : 12
month-name : December
month-abbreviation : Dec
- week-in-year : 53
+ week-in-year : 52
day-in-year : 366
day-in-month : 31
day-of-week-in-month : 5
@@ -79,7 +79,7 @@
month-in-year : 12
month-name : December
month-abbreviation : Dec
- week-in-year : 53
+ week-in-year : 1
day-in-year : 366
day-in-month : 31
day-of-week-in-month : 5