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

Re: Modules that load but do nothing



On Thu, Jan 22, 2015 at 4:41 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> If you configure --disable-dynamic and then force modules to be linked
> by changing config.modules to "link=static", the build will create the
> necessary .a file so that the linking phase completes, and loading the
> module with "zmodload" will return a zero status; but it is possible in
> this case for some modules to load with no features.
>
> The plainest example of this is zsh/pcre, which will compile and link
> but fail the V07 test suite.
>
> Are there other such modules?  zsh/regex and zsh/curses, perhaps?  There
> are no tests applied to the latter; the former is tested in C02.
>
> I'd suggest that at least we do the following:
>
> diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst
> index 3a65331..3c25be2 100644
> --- a/Test/V07pcre.ztst
> +++ b/Test/V07pcre.ztst
> @@ -1,6 +1,6 @@
>  %prep
>
> -  if ! zmodload zsh/pcre 2>/dev/null
> +  if ! zmodload -F zsh/pcre C:pcre-match 2>/dev/null
>    then
>      ZTST_unimplemented="the zsh/pcre module is not available"
>      return 0

I was trying to link zsh against musl the other week to test some
unicode 6.1 stuff, and ended up with a terminfo module that didn't
provide echoti or $terminfo. I haven't looked at any tests in relation
to that though.

-- 
Mikael Magnusson



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