diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-07 06:23:09 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-07 06:23:09 +0000 |
commit | 8ac79b707663c8f827715c2e0aaf75d251bc4179 (patch) | |
tree | f1ab4a0a902f75ed64e64dce7c90a09af754fcd3 /tests/touch | |
parent | b8f278429d6ca2f88eeb3040486599d25a2a202d (diff) | |
download | coreutils-8ac79b707663c8f827715c2e0aaf75d251bc4179.tar.xz |
Test for "touch -- MMDDmm file" bug. Also, set
_POSIX2_VERSION=199209 and POSIXLY_CORRECT=1 so that it's
a better test for obsolescent features.
Diffstat (limited to 'tests/touch')
-rwxr-xr-x | tests/touch/obsolescent | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent index b7242ed20..d6689b34f 100755 --- a/tests/touch/obsolescent +++ b/tests/touch/obsolescent @@ -1,5 +1,8 @@ #!/bin/sh -# make sure touch succeeds with a single 8- or 10-digit file name argument +# Test touch with obsolescent 8- or 10-digit time stamps. + +_POSIX2_VERSION=199209; export _POSIX2_VERSION +POSIXLY_CORRECT=1; export POSIXLY_CORRECT if test "$VERBOSE" = yes; then set -x @@ -22,9 +25,15 @@ fi fail=0 +yearstart=01010000 + for ones in 11111111 1111111111; do - touch $ones || fail=1 - test -f $ones || fail=1 + for args in $ones "-- $ones" "$yearstart $ones" "-- $yearstart $ones"; do + touch $args || fail=1 + test -f $ones || fail=1 + test -f $yearstart && fail=1 + rm -f $ones || fail=1 + done done (exit $fail); exit $fail |