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

Re: [PATCH] find RLIM_NLIMITS correctly on Cygwin



Bart Schaefer wrote on Fri, 20 Mar 2020 11:39 -0700:
> On Fri, Mar 20, 2020 at 11:28 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > That is, we want the
> > test suite to fail if the module failed to load even though it was
> > enabled in config.modules.  
> 
> An alternate approach (and maybe one that the suite already supports,
> Test/V01zmodload.ztst?) is to separate the test for module loading
> bugs from the tests for module feature bugs.

I think that'd be just this? —

diff --git a/Test/V01zmodload.ztst b/Test/V01zmodload.ztst
index 0a7fbb651..daf49cd72 100644
--- a/Test/V01zmodload.ztst
+++ b/Test/V01zmodload.ztst
@@ -64,7 +64,7 @@
 
  for m in $mods
  do
-   zmodload $m || mods[(r)$m]=()
+   zmodload $m || return $?
  done
 0d:Test loading of all compiled modules
 
diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst
index 1c2a5a4df..15a0982c8 100644
--- a/Test/V07pcre.ztst
+++ b/Test/V07pcre.ztst
@@ -1,11 +1,10 @@
 %prep
 
-  if grep '^name=zsh/pcre .* link=no ' $ZTST_testdir/../config.modules >/dev/null
+  if ! zmodload zsh/pcre 2>/dev/null; then
   then
     ZTST_unimplemented="the zsh/pcre module was disabled by configure (see config.modules)"
     return 0
   fi
-  zmodload zsh/pcre || return $?
   setopt rematch_pcre
 # Find a UTF-8 locale.
   setopt multibyte



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