| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #! /bin/sh
- # '%W%'
- rm -f -r try
- mkdir try
- make `make names`
- cp `make names` try
- cd try
- make date right_only TZDIR=zoneinfo CFLAGS="-g -DEBUG $*"
- set -v
- # America/New_York tests
- TZ=America/New_York
- export TZ
- # All the legal forms.
- ./date 2007
- ./date 2007.44
- ./date 112007
- ./date 112007.44
- ./date 03022007
- ./date 03022007.44
- ./date 8903022007
- ./date 8903022007.44
- ./date 0302200789
- ./date 0302200789.44
- ./date 198903022007.44
- # Illegal forms
- ./date 030220071989
- ./date 030220071989.44
- # Far future times
- ./date 200103022007.44
- ./date 210103022007.44
- # Far past time--only legal as USG-style
- ./date 0103022007.44
- # Ambiguous, BSD vs. USG
- ./date 0203040506
- # Unambiguous, BSD vs. USG
- ./date 0202020202
- # Times around spring forward
- ./date 198904020130.00
- ./date 198904020159.59
- ./date 198904020200.00
- ./date 198904020200.01
- ./date 198904020230.00
- ./date 198904020259.59
- ./date 198904020300.00
- ./date 198904020300.01
- ./date 198904020330.00
- # Times around fall back
- ./date 198910290030.00
- ./date 198910290059.59
- ./date 198910290100.00
- ./date 198910290100.01
- ./date 198910290130.00
- ./date 198910290159.59
- ./date 198910290200.00
- ./date 198910290200.01
- ./date 198910290230.00
- #
- # Wrong leap second
- ./date 198712312359.60
- # Right leap second
- ./date 198712311859.60
- # Mideast Madness
- # Should get an "ambiguous time" message
- TZ=Mideast/Riyadh89 ./date 198906011200
- # Should get a "spring forward" message
- TZ=Mideast/Riyadh89 ./date 198903011159.59
- # British Balminess
- # Should get an "ambiguous time" message
- TZ=GB-Eire ./date 197110310030
- # Wrong content
- ./date ""
- ./date xxx
- # Wrong length
- ./date 123
- # Multiple dots
- ./date 1234..56
- # Dot, no seconds
- ./date 1234.
- # Dot, no main part
- ./date .56
- # Wrong length seconds
- ./date 1234.5
- ./date 1234.567
|