Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.0.8.-test-3



On Wed, Aug 26, 2015 at 12:22 AM, Danek Duvall <duvall@xxxxxxxxxxxxxx> wrote:
> On Tue, Aug 25, 2015 at 07:48:07PM +0100, Peter Stephenson wrote:
>
>> I've uploaded 5.0.8-test-3 to
>>
>> http://www.zsh.org/pub/development/
>>
>> The changes from 5.0.8.-test-2 are mostly minor; the most significant
>> fixed testing using zpty on OpenBSD, thanks to Jun.
>>
>> If you have a not very common operating system, please try this out;
>> otherwise, 5.1 should be fit to release.
>
> I'm getting the following failure on Solaris (12):
>
>     *** /tmp/zsh.ztst.out.28050     Tue Aug 25 12:45:19 2015
>     --- /tmp/zsh.ztst.tout.28050    Tue Aug 25 12:45:19 2015
>     ***************
>     *** 1,4 ****
>       THURSDAY
>     !    JANUARY
>       090
>       1
>     --- 1,4 ----
>       THURSDAY
>     ! %^_10B
>       090
>       1
>     Test ./V09datetime.ztst failed: output differs from expected as shown above for:
>       if [[ $skip_extensions = 1 ]]; then
>         ZTST_skip="strftime extensions not supported"
>       else
>         (
>           strftime '%#A' 0
>           strftime '%^_10B' 0
>           strftime %03Ey 650000000
>           strftime %-Oe 0
>         )
>       fi
>     Was testing: various extensions
>     ./V09datetime.ztst: test failed.
>
> Any ideas?  Perhaps this particular set of strftime expandos aren't
> supported on Solaris.

So it seems. I don't have access to any obscure operating systems so I
just guessed that if someone supported one extension, they'd support
all of them. The one we test to see if we should skip the test is just
zero-padding though which is pretty easy/obvious to implement. I guess
we can check that one instead / as well. It looks like it supports
both # and E too, so those wouldn't do the trick.

diff --git i/Test/V09datetime.ztst w/Test/V09datetime.ztst
index c935199..902fc6f 100644
--- i/Test/V09datetime.ztst
+++ w/Test/V09datetime.ztst
@@ -8,7 +8,7 @@
   unset LC_ALL
   LC_TIME=C
   TZ=UTC+0
-  [[ "$(strftime %04y 1)" = "0070" ]] || skip_extensions=1
+  [[ "$(strftime %^_10B 0)" = "   JANUARY" ]] || skip_extensions=1
   [[ "$(LC_TIME=ja_JP.UTF-8 strftime %OS 1)" = 一 ]] || skip_japanese=1

 %test

Now the question is if someone supports that one, but not the others
:). (If we try all of them and skip the test, the test approaches
being sort of pointless, except we can notice it was skipped on a
glibc system and realize something is wrong in our parsing.)

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author