Return to test-strptime.c CVS log | Up to [cvsweb.bsd.lv] / mandoc |
File: [cvsweb.bsd.lv] / mandoc / test-strptime.c (download)
Revision 1.2, Sat Jan 4 01:11:00 2014 UTC (10 years, 8 months ago) by schwarze
Clean up feature tests: * Split the configure steering script out of the Makefile. * Let the configure step depend on the test sources. * Clean up the test programs such that they can be run. |
#if defined(__linux__) || defined(__MINT__) # define _GNU_SOURCE /* strptime() */ #endif #include <time.h> int main(void) { struct tm tm; const char input[] = "2014-01-04"; return( ! (input+10 == strptime(input, "%Y-%m-%d", &tm) && 114 == tm.tm_year && 0 == tm.tm_mon && 4 == tm.tm_mday)); }