diff options
Diffstat (limited to 'test-date.c')
-rw-r--r-- | test-date.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test-date.c b/test-date.c new file mode 100644 index 0000000000..62e8f2387a --- /dev/null +++ b/test-date.c @@ -0,0 +1,20 @@ +#include "cache.h" + +int main(int argc, char **argv) +{ + int i; + + for (i = 1; i < argc; i++) { + char result[100]; + time_t t; + + memcpy(result, "bad", 4); + parse_date(argv[i], result, sizeof(result)); + t = strtoul(result, NULL, 0); + printf("%s -> %s -> %s", argv[i], result, ctime(&t)); + + t = approxidate(argv[i]); + printf("%s -> %s\n", argv[i], ctime(&t)); + } + return 0; +} |