+#ifndef REGTEST
+ /* Replace with a call to mktime() once that is implemented. */
+ struct tm timeptr = { 59, 30, 12, 1, 9, 72, 0, 274, -1 };
+ char buffer[100];
+ TESTCASE( strftime( buffer, 100, "%a ", &timeptr ) == 4 );
+ TESTCASE( strcmp( buffer, "Sun " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%A ", &timeptr ) == 7 );
+ TESTCASE( strcmp( buffer, "Sunday " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%b ", &timeptr ) == 4 );
+ TESTCASE( strcmp( buffer, "Oct " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%h ", &timeptr ) == 4 );
+ TESTCASE( strcmp( buffer, "Oct " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%B ", &timeptr ) == 8 );
+ TESTCASE( strcmp( buffer, "October " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%c ", &timeptr ) == 25 );
+ TESTCASE( strcmp( buffer, "Sun Oct 1 12:30:59 1972 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%C ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "19 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%d ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "01 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%D ", &timeptr ) == 9 );
+ TESTCASE( strcmp( buffer, "10/01/72 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%e ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, " 1 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%F ", &timeptr ) == 11 );
+ TESTCASE( strcmp( buffer, "1972-10-01 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%H ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "12 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%I ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "01 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%j ", &timeptr ) == 4 );
+ TESTCASE( strcmp( buffer, "274 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%m ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "10 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%M ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "30 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%p ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "PM " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%r ", &timeptr ) == 12 );
+ TESTCASE( strcmp( buffer, "01:30:59 PM " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%R ", &timeptr ) == 6 );
+ TESTCASE( strcmp( buffer, "12:30 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%S ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "59 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%T ", &timeptr ) == 9 );
+ TESTCASE( strcmp( buffer, "12:30:59 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%u ", &timeptr ) == 2 );
+ TESTCASE( strcmp( buffer, "7 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%w ", &timeptr ) == 2 );
+ TESTCASE( strcmp( buffer, "0 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%x ", &timeptr ) == 9 );
+ TESTCASE( strcmp( buffer, "10/01/72 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%X ", &timeptr ) == 9 );
+ TESTCASE( strcmp( buffer, "12:30:59 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%y ", &timeptr ) == 3 );
+ TESTCASE( strcmp( buffer, "72 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%Y ", &timeptr ) == 5 );
+ TESTCASE( strcmp( buffer, "1972 " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%% ", &timeptr ) == 2 );
+ TESTCASE( strcmp( buffer, "% " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%n ", &timeptr ) == 2 );
+ TESTCASE( strcmp( buffer, "\n " ) == 0 );
+ TESTCASE( strftime( buffer, 100, "%t ", &timeptr ) == 2 );
+ TESTCASE( strcmp( buffer, "\t " ) == 0 );
+#endif