[Lsb-messages] /var/www/bzr/lsb/devel/olver-core-tests r98: Fix strptime test; no Sunday in week 0 in test (bug 2914).
Jeff Licquia
licquia at linuxfoundation.org
Mon Aug 5 19:21:57 UTC 2013
------------------------------------------------------------
revno: 98
author: Kurban Mallachiev <mallachiev at ispras.ru>
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: olver-core-tests
timestamp: Mon 2013-08-05 15:21:57 -0400
message:
Fix strptime test; no Sunday in week 0 in test (bug 2914).
modified:
src/testdata/util.format.time/strptime_testdata.list
-------------- next part --------------
=== modified file 'src/testdata/util.format.time/strptime_testdata.list'
--- a/src/testdata/util.format.time/strptime_testdata.list 2010-01-14 16:50:38 +0000
+++ b/src/testdata/util.format.time/strptime_testdata.list 2013-08-05 19:21:57 +0000
@@ -2099,8 +2099,8 @@
}
},
{
- // The week number of year. %U
- .query = "0 Mon 2007",
+ // The week number of year. %W
+ .query = "1 Mon 2007", //%W: The first Monday of January is the first day of week 1.
.locale = "C",
.format = "%W %a %Y",
.answ =
@@ -2112,7 +2112,7 @@
},
{
// The week number of year. %U
- .query = "0 Sun 2006",
+ .query = "1 Sun 2006", //%U: The first Sunday of January is the first day of week 1.
.locale = "C",
.format = "%U %a %Y",
.answ =
@@ -2121,19 +2121,25 @@
.tm_yday = 0, .bYDay = true,
.reqs = ";strptime.06.23;strptime.06.01;strptime.06.29;"
}
-},
-{
- // The week number of year. %U
- .query = "0 Mon 2009",
- .locale = "C",
- .format = "%U %a %Y",
- .answ =
- {
- .Error = 1,
- .reqs = ""
- }
}
-
+ /*
+ * 1st of January 2009 is Thursday, so there is no Monday on the 0th week of 2009.
+ * POSIX does not specify expected behaviour in this case.
+ * Currently glibc succeeds and fills tm structure with some values.
+ * So the next test was disabled.
+ * See discussion at: https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=2914
+ *{
+ * // The week number of year. %U
+ * .query = "0 Mon 2009",
+ * .locale = "C",
+ * .format = "%U %a %Y",
+ * .answ =
+ * {
+ * .Error = 1,
+ * .reqs = ""
+ * }
+ *}
+ */
// =============================== FOR Olver_Locale ===========================
,
More information about the lsb-messages
mailing list