Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libutil Adapt to a recent change in parsedate().
details: https://anonhg.NetBSD.org/src/rev/2109a23d132b
branches: trunk
changeset: 332762:2109a23d132b
user: apb <apb%NetBSD.org@localhost>
date: Tue Oct 07 22:33:52 2014 +0000
description:
Adapt to a recent change in parsedate().
"9/10/69" still refers to 2069, and "9/10/70" still refers to 1970,
but "69-09-10" and "70-09-10" now refer to the years 69 and 70.
diffstat:
tests/lib/libutil/t_parsedate.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 6093baf1d2e1 -r 2109a23d132b tests/lib/libutil/t_parsedate.c
--- a/tests/lib/libutil/t_parsedate.c Tue Oct 07 22:27:14 2014 +0000
+++ b/tests/lib/libutil/t_parsedate.c Tue Oct 07 22:33:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parsedate.c,v 1.9 2014/10/07 19:26:31 apb Exp $ */
+/* $NetBSD: t_parsedate.c,v 1.10 2014/10/07 22:33:52 apb Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_parsedate.c,v 1.9 2014/10/07 19:26:31 apb Exp $");
+__RCSID("$NetBSD: t_parsedate.c,v 1.10 2014/10/07 22:33:52 apb Exp $");
#include <atf-c.h>
#include <errno.h>
@@ -100,10 +100,14 @@
ATF_TC_BODY(dates, tc)
{
- parsecheck("69-09-10", NULL, NULL, localtime_r,
+ parsecheck("9/10/69", NULL, NULL, localtime_r,
2069, 9, 10, 0, 0, 0); /* year < 70: add 2000 */
+ parsecheck("9/10/70", NULL, NULL, localtime_r,
+ 1970, 9, 10, 0, 0, 0); /* 70 <= year < 100: add 1900 */
+ parsecheck("69-09-10", NULL, NULL, localtime_r,
+ 69, 9, 10, 0, 0, 0); /* ISO8601 year remains unchanged */
parsecheck("70-09-10", NULL, NULL, localtime_r,
- 1970, 9, 10, 0, 0, 0); /* 70 <= year < 100: add 1900 */
+ 70, 9, 10, 0, 0, 0); /* ISO8601 year remains unchanged */
parsecheck("2006-11-17", NULL, NULL, localtime_r,
2006, 11, 17, 0, 0, 0);
parsecheck("10/1/2000", NULL, NULL, localtime_r,
Home |
Main Index |
Thread Index |
Old Index