summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2018-09-18 23:15:01 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2018-09-24 14:15:18 +0000
commitdc2bfeee26e8f0c72f44b71e7369ae851bac4854 (patch)
tree4981c5ffbc7fe678a388716862e4f637a4b3a0ad
parente9a75f4bc70f4990775899d22fa298039de73ef5 (diff)
downloadzsh-dc2bfeee26e8f0c72f44b71e7369ae851bac4854.tar.gz
zsh-dc2bfeee26e8f0c72f44b71e7369ae851bac4854.tar.xz
zsh-dc2bfeee26e8f0c72f44b71e7369ae851bac4854.zip
43493: Have V07pcre fail if PCRE was enabled by configure (config.modules) but failed to load for any reason.
-rw-r--r--ChangeLog5
-rw-r--r--Test/V07pcre.ztst5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 745ddbe55..8a309c42a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-24  Daniel Shahaf  <danielsh@apache.org>
+
+	* 43493: Test/V07pcre.ztst: Have V07pcre fail if PCRE was enabled
+	by configure (config.modules) but failed to load for any reason.
+
 2018-09-24  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 43527, tweaked: Etc/FAQ.yo: describe "which" output
diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst
index 9feeb47fb..ab67f3d80 100644
--- a/Test/V07pcre.ztst
+++ b/Test/V07pcre.ztst
@@ -1,11 +1,10 @@
 %prep
 
-  if ! zmodload -F zsh/pcre C:pcre-match 2>/dev/null
+  if grep '^name=zsh/pcre .* link=no ' $ZTST_testdir/../config.modules >/dev/null
   then
-    ZTST_unimplemented="the zsh/pcre module is not available"
+    ZTST_unimplemented="the zsh/pcre module was disabled by configure (see config.modules)"
     return 0
   fi
-# Load the rest of the builtins
   zmodload zsh/pcre
   setopt rematch_pcre
 # Find a UTF-8 locale.