diff options
author | dana <dana@dana.is> | 2018-12-24 02:42:18 -0600 |
---|---|---|
committer | dana <dana@dana.is> | 2018-12-24 02:42:18 -0600 |
commit | f64cd71d442b0b7152131282dd7567be010edb78 (patch) | |
tree | c3471a1d13a548c583018ac26b907252a2ef1881 /Test | |
parent | e75c59f7f5eb2f2d69a0aa346e80a7dc0463dee6 (diff) | |
download | zsh-f64cd71d442b0b7152131282dd7567be010edb78.tar.gz zsh-f64cd71d442b0b7152131282dd7567be010edb78.tar.xz zsh-f64cd71d442b0b7152131282dd7567be010edb78.zip |
43935: Reject too-large nanosecond values given to strftime
... and, in so doing, fix an error in the tests on 32-bit machines. The value for the new too-large test is changed slightly from the patch posted to the ML to make it test for the right thing on 32-bit machines as well.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/V09datetime.ztst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Test/V09datetime.ztst b/Test/V09datetime.ztst index 22d560750..2041d9b40 100644 --- a/Test/V09datetime.ztst +++ b/Test/V09datetime.ztst @@ -90,7 +90,7 @@ strftime '%Y-%m-%d %H:%M:%S.%3.' 1012615322 strftime '%Y-%m-%d %H:%M:%S.%3.' 1012615322 0 strftime '%Y-%m-%d %H:%M:%S.%3.' 1012615322 2 - strftime '%Y-%m-%d %H:%M:%S.%3.' 1012615322 $(( 222 * (10 ** 9) )) + strftime '%Y-%m-%d %H:%M:%S.%3.' 1012615322 $(( 222 * (10 ** 6) )) 0:optional nanoseconds >2002-02-02 02:02:02.000 >2002-02-02 02:02:02.000 @@ -103,6 +103,9 @@ strftime '%Y' 1012615322 '' 2> /dev/null 1:empty nanoseconds not allowed + strftime '%N' 1012615322 $(( 10 ** 9 )) 2> /dev/null +1:too-large nanoseconds not allowed + strftime '%N' 1012615322 ${(l<64><9>):-} 2> /dev/null 1:overflowed nanoseconds not allowed |