mirror of
https://github.com/zsh-users/zsh
synced 2024-10-14 11:53:24 +00:00
fix tests using zsh/datetime that I broke
This commit is contained in:
parent
773737e09f
commit
548c4562fe
|
@ -1,5 +1,8 @@
|
|||
2011-08-11 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* Src/params.c: unposted: Src/params.c, Test/V04features.ztst:
|
||||
fix some tests I broke.
|
||||
|
||||
* Src/subst.c: 29674: Src/Modules/datetime.c,
|
||||
Doc/Zsh/mod_datetime.yo: add $epochtime array.
|
||||
|
||||
|
@ -15229,5 +15232,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.5419 $
|
||||
* $Revision: 1.5420 $
|
||||
*****************************************************
|
||||
|
|
18
Src/params.c
18
Src/params.c
|
@ -3046,9 +3046,21 @@ mod_export void
|
|||
stdunsetfn(Param pm, UNUSED(int exp))
|
||||
{
|
||||
switch (PM_TYPE(pm->node.flags)) {
|
||||
case PM_SCALAR: pm->gsu.s->setfn(pm, NULL); break;
|
||||
case PM_ARRAY: pm->gsu.a->setfn(pm, NULL); break;
|
||||
case PM_HASHED: pm->gsu.h->setfn(pm, NULL); break;
|
||||
case PM_SCALAR:
|
||||
if (pm->gsu.s->setfn)
|
||||
pm->gsu.s->setfn(pm, NULL);
|
||||
break;
|
||||
|
||||
case PM_ARRAY:
|
||||
if (pm->gsu.a->setfn)
|
||||
pm->gsu.a->setfn(pm, NULL);
|
||||
break;
|
||||
|
||||
case PM_HASHED:
|
||||
if (pm->gsu.h->setfn)
|
||||
pm->gsu.h->setfn(pm, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!(pm->node.flags & PM_SPECIAL))
|
||||
pm->u.str = NULL;
|
||||
|
|
|
@ -17,18 +17,24 @@
|
|||
0:Loading modules with no features
|
||||
>-b:strftime
|
||||
>-p:EPOCHSECONDS
|
||||
>-p:EPOCHREALTIME
|
||||
>-p:epochtime
|
||||
|
||||
zmodload -F zsh/datetime b:strftime
|
||||
zmodload -lF zsh/datetime
|
||||
0:Enabling features
|
||||
>+b:strftime
|
||||
>-p:EPOCHSECONDS
|
||||
>-p:EPOCHREALTIME
|
||||
>-p:epochtime
|
||||
|
||||
zmodload -F zsh/datetime +p:EPOCHSECONDS -b:strftime
|
||||
zmodload -lF zsh/datetime
|
||||
0:Disabling features
|
||||
>-b:strftime
|
||||
>+p:EPOCHSECONDS
|
||||
>-p:EPOCHREALTIME
|
||||
>-p:epochtime
|
||||
|
||||
zmodload -Fe zsh/datetime p:EPOCHSECONDS b:strftime
|
||||
0:Testing existing features
|
||||
|
@ -109,6 +115,8 @@
|
|||
0:Feature state with loading after error enabling
|
||||
>+b:strftime
|
||||
>-p:EPOCHSECONDS
|
||||
>+p:EPOCHREALTIME
|
||||
>+p:epochtime
|
||||
|
||||
zmodload -F zsh/datetime p:EPOCHSECONDS
|
||||
zmodload -Fe zsh/datetime +p:EPOCHSECONDS
|
||||
|
@ -159,3 +167,5 @@
|
|||
0:zmodload with no -F enables all features
|
||||
>+b:strftime
|
||||
>+p:EPOCHSECONDS
|
||||
>+p:EPOCHREALTIME
|
||||
>+p:epochtime
|
||||
|
|
Loading…
Reference in a new issue