Commit 548c4562 authored by Peter Stephenson's avatar Peter Stephenson

fix tests using zsh/datetime that I broke

parent 773737e0
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 $
*****************************************************
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment