Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: ztrftime: Pass everything unhandled to the system strftime()
On Fri, Jul 10, 2015 at 4:53 PM, Jun T. <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> V09datetime fails on Mac OS X, because the OS does not
> support "%04y" nor "%Ey" but only skip_extensions is set.
>
> mac% strftime %04y 1
> 4y
> mac% LC_TIME=ja_JP.UTF-8 strftime %OS 1
> 01
>
> I think these two skip_* need be set independently.
>
>
> diff --git a/Test/V09datetime.ztst b/Test/V09datetime.ztst
> index a7ef983..475adde 100644
> --- a/Test/V09datetime.ztst
> +++ b/Test/V09datetime.ztst
> @@ -8,13 +8,8 @@
> unset LC_ALL
> LC_TIME=C
> TZ=UTC+0
> - if [[ "$(strftime %04y 1)" = "0070" ]]; then
> - [[ "$(LC_TIME=ja_JP.UTF-8 strftime %OS 1)" = 一 ]] || {
> - skip_japanese=1
> - }
> - else
> - skip_extensions=1
> - fi
> + [[ "$(strftime %04y 1)" = "0070" ]] || skip_extensions=1
> + [[ "$(LC_TIME=ja_JP.UTF-8 strftime %OS 1)" = 一 ]] || skip_japanese=1
>
> %test
Oops, yeah, I think I intended to check both of the parameters in the
second test case, then forgot. The idea is that only skip_japanese
can't be set, so I wrote the logic to enforce that. I'll commit this
as well to not print a misleading skip message if both are set.
@@ -34,7 +29,9 @@
>6_6_3_3
>000000
- if [[ $skip_japanese = 1 ]]; then
+ if [[ $skip_extensions = 1 ]]; then
+ ZTST_skip="strftime extensions not supported"
+ elif [[ $skip_japanese = 1 ]]; then
ZTST_skip="Japanese UTF-8 locale not supported"
else
(
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author