From 025e41d91ffb218e2645a25f2c258598347f2566 Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 21 Jan 1998 06:13:08 +0000 Subject: [PATCH] Add support for comments in the test input. --- regress/lib/libc/time/strptime/main.c | 4 ++++ regress/lib/libc/time/strptime/tests | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/regress/lib/libc/time/strptime/main.c b/regress/lib/libc/time/strptime/main.c index adcabc14b582..1efeb4618486 100644 --- a/regress/lib/libc/time/strptime/main.c +++ b/regress/lib/libc/time/strptime/main.c @@ -32,6 +32,10 @@ main() if (!strcmp(title, "EOF\n")) return(0); + if (title[0] == '#' || title[0] == '\n') { + free(title); + continue; + } p = fgetln(stdin, &len); if (p == 0) diff --git a/regress/lib/libc/time/strptime/tests b/regress/lib/libc/time/strptime/tests index 6149f6f5ab51..d96393b2b73c 100644 --- a/regress/lib/libc/time/strptime/tests +++ b/regress/lib/libc/time/strptime/tests @@ -1,3 +1,4 @@ +# some intial checks to make sure common things work --- ctime --- 1 Tue Jan 20 23:27:46 1998 %a %b %d %T %Y @@ -7,6 +8,8 @@ Tue Jan 20 23:27:46 1998 --- ctime --- 3 Tue Jan 20 23:27:46 1998 %c + +# test some valid and invalid day names --- %a --- 1 Sun %a @@ -103,6 +106,8 @@ Saturn --- %A --- 16 Moon %A + +# test some valid and invalid month names --- %b --- 1 Jan %b