diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-06-27 17:27:39 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-06-27 17:27:39 +0000 |
commit | 80922a99e39ecf1fd229bd58c3a3ccbbd2841d0f (patch) | |
tree | 8814129c76f1b5179decbcd2ca04d87d93d747d1 /localedata/tst-strptime.c | |
parent | 34ca2ff7da8f3701fc476fd84984677262390c09 (diff) | |
download | glibc-80922a99e39ecf1fd229bd58c3a3ccbbd2841d0f.zip glibc-80922a99e39ecf1fd229bd58c3a3ccbbd2841d0f.tar.gz glibc-80922a99e39ecf1fd229bd58c3a3ccbbd2841d0f.tar.bz2 |
[BZ #6657]
2008-06-27 Ulrich Drepper <drepper@redhat.com>
[BZ #6657]
* time/strptime_l.c: Don't clear s.era_cnt after successful match
of %EY.
Patch by Petr Baudis.
Diffstat (limited to 'localedata/tst-strptime.c')
-rw-r--r-- | localedata/tst-strptime.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/localedata/tst-strptime.c b/localedata/tst-strptime.c index 2d4bb7c..bc2c7f1 100644 --- a/localedata/tst-strptime.c +++ b/localedata/tst-strptime.c @@ -37,6 +37,16 @@ r = %p, r-s2 = %tu, tm.tm_mday = %d, tm.tm_mon = %d, tm.tm_year = %d\n", result |= (r == NULL || r - s2 != 14 || tm.tm_mday != 25 || tm.tm_mon != 5 || tm.tm_year != 108); + static const char s3[] = "\ +\x32\x35\x20\x30\x36\x20\xe5\xb9\xb3\xe6\x88\x90\x32\x30\xe5\xb9\xb4\0"; + memset (&tm, '\0', sizeof (tm)); + r = strptime (s3, "%d %m %EY", &tm); + printf ("\ +r = %p, r-s3 = %tu, tm.tm_mday = %d, tm.tm_mon = %d, tm.tm_year = %d\n", + r, r - s3, tm.tm_mday, tm.tm_mon, tm.tm_year); + result |= (r == NULL || r - s3 != 17 || tm.tm_mday != 25 || tm.tm_mon != 5 + || tm.tm_year != 108); + return result; } |