Module Name: src Committed By: snj Date: Sat Oct 11 16:45:24 UTC 2014
Modified Files: src/tests/lib/libutil [netbsd-7]: t_parsedate.c Log Message: Pull up following revision(s) (requested by apb in ticket #135): tests/lib/libutil/t_parsedate.c: revision 1.10 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. To generate a diff of this commit: cvs rdiff -u -r1.7.8.2 -r1.7.8.3 src/tests/lib/libutil/t_parsedate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libutil/t_parsedate.c diff -u src/tests/lib/libutil/t_parsedate.c:1.7.8.2 src/tests/lib/libutil/t_parsedate.c:1.7.8.3 --- src/tests/lib/libutil/t_parsedate.c:1.7.8.2 Sat Oct 11 16:43:46 2014 +++ src/tests/lib/libutil/t_parsedate.c Sat Oct 11 16:45:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_parsedate.c,v 1.7.8.2 2014/10/11 16:43:46 snj Exp $ */ +/* $NetBSD: t_parsedate.c,v 1.7.8.3 2014/10/11 16:45:24 snj 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.7.8.2 2014/10/11 16:43:46 snj Exp $"); +__RCSID("$NetBSD: t_parsedate.c,v 1.7.8.3 2014/10/11 16:45:24 snj Exp $"); #include <atf-c.h> #include <errno.h> @@ -100,10 +100,14 @@ ATF_TC_HEAD(dates, tc) 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("70-09-10", NULL, NULL, localtime_r, + 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, + 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,