diff options
author | Jim Meyering <meyering@redhat.com> | 2012-07-04 13:01:56 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-07-04 13:32:24 +0200 |
commit | cc322ddd16607c0c8e978e5003008344e2710ec9 (patch) | |
tree | eceb3dd878d732733986ed1359654c9b110c6cb2 /tests/misc/date | |
parent | 74427c76d7be2a5522a8d24e29bfa63c299dbbce (diff) | |
download | coreutils-cc322ddd16607c0c8e978e5003008344e2710ec9.tar.xz |
date: fails to diagnose invalid input
date -d "$(printf '\xb0')" would print 00:00:00 with today's date
rather than diagnosing the invalid input. Now it reports this:
date: invalid date '\260'
* gnulib: Update submodule to latest for fixed parse-datetime.y.
* tests/misc/date [invalid-high-bit-set]: New test.
* NEWS (Bug fixes): Mention it.
* bootstrap, tests/init.sh: Also update to latest.
Reported by Peter Evans in http://bugs.gnu.org/11843
Diffstat (limited to 'tests/misc/date')
-rwxr-xr-x | tests/misc/date | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/date b/tests/misc/date index 8a23ca9c6..8b6fdb24d 100755 --- a/tests/misc/date +++ b/tests/misc/date @@ -282,6 +282,11 @@ my @Tests = # most others print 'WED DEC 8 07:30:00 1999'. {OUT_SUBST => 's/ [ 0]8.*//'}, {OUT=>'WED DEC'}], + + ['invalid-high-bit-set', "-d '\xb0'", + {ERR => "date: invalid date '\\260'\n"}, + {EXIT => 1}, + ], ); # Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364. |