diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-02-16 14:42:43 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-02-16 14:42:43 +0000 |
commit | 7548e75065063dae256d94e6c7f4f9f43bd7f210 (patch) | |
tree | f23b000f8822f6eb70249c1106a3275deaa03bac /gnulib-tests/test-parse-datetime.c | |
parent | ddefcddae2e97579f82320f4fd70d0ba14a52392 (diff) | |
parent | 974ab3dd887985e3aa347f3c6521f819296396a0 (diff) | |
download | coreutils-7548e75065063dae256d94e6c7f4f9f43bd7f210.tar.gz |
Merge tag 'upstream/8.21'
Upstream version 8.21
Diffstat (limited to 'gnulib-tests/test-parse-datetime.c')
-rw-r--r-- | gnulib-tests/test-parse-datetime.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnulib-tests/test-parse-datetime.c b/gnulib-tests/test-parse-datetime.c index 4c0370d2..7eba9ad7 100644 --- a/gnulib-tests/test-parse-datetime.c +++ b/gnulib-tests/test-parse-datetime.c @@ -1,5 +1,5 @@ /* Test of parse_datetime() function. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2013 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,6 +123,12 @@ main (int argc _GL_UNUSED, char **argv) set_program_name (argv[0]); + /* Set the time zone to US Eastern time with the 2012 rules. This + should disable any leap second support. Otherwise, there will be + a problem with glibc on sites that default to leap seconds; see + <http://bugs.gnu.org/12206>. */ + setenv ("TZ", "EST5EDT,M3.2.0,M11.1.0", 1); + gmtoff = gmt_offset (ref_time); @@ -409,5 +415,9 @@ main (int argc _GL_UNUSED, char **argv) ASSERT (result.tv_sec == 24 * 3600 && result.tv_nsec == now.tv_nsec); + /* Exercise a sign-extension bug. Before July 2012, an input + starting with a high-bit-set byte would be treated like "0". */ + ASSERT ( ! parse_datetime (&result, "\xb0", &now)); + return 0; } |