posixtm-tests: revamp
authorJim Meyering <meyering@redhat.com>
Thu, 17 Sep 2009 12:15:38 +0000 (14:15 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 19 Sep 2009 16:33:05 +0000 (18:33 +0200)
commiteee5595d424b0df7e9a135dbf11b999673a821f0
tree6ea2c1105c67d425cf1c2b432749223b7bcc1b28
parentde9d0ef74570f3faec1951ad2d1869d2c2f15533
posixtm-tests: revamp

Record only the expected time_t value, not the ctime string.
Skip any test that would require a time_t value larger than
currently representable (e.g., if run with 32-bit time_t,
this skips any test that expects an out-of-range value).
* tests/test-posixtm.c (struct posixtm_test) [valid, t_expected]:
New members.
[expected]: Remove member.
(T): Include new column: valid.  Move date strings into comments.
(main): Adapt.
Print a diagnostic for each skipped test.
Don't skip the entire test (exit 77) if time_t is unsigned.
Instead, skip only the individual tests with a negative result.
tests/test-posixtm.c