summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2020-03-26 06:56:18 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2020-03-27 01:14:42 +0000
commit32c4ed3977cc25bbda59e4ee71a7ecbe285d6921 (patch)
tree364369d1e843d90eda825162a9de67eadf473396 /Test
parent45616: Remove token from count argument to repeat (diff)
downloadzsh-32c4ed3977cc25bbda59e4ee71a7ecbe285d6921.tar
zsh-32c4ed3977cc25bbda59e4ee71a7ecbe285d6921.tar.gz
zsh-32c4ed3977cc25bbda59e4ee71a7ecbe285d6921.tar.bz2
zsh-32c4ed3977cc25bbda59e4ee71a7ecbe285d6921.tar.lz
zsh-32c4ed3977cc25bbda59e4ee71a7ecbe285d6921.tar.xz
zsh-32c4ed3977cc25bbda59e4ee71a7ecbe285d6921.tar.zst
zsh-32c4ed3977cc25bbda59e4ee71a7ecbe285d6921.zip
45591 (Cf. 45587, 45620): In the test suite, centralize testing that compiled modules can be loaded successfully.
Have V01zmodload.ztst check that all modules enabled in config.modules load successfully. With this change, the test files for individual modules may assume that if 'zmodload' fails that must be because the module hadn't been compiled in, and mark themselves as skipped in that case.
Diffstat (limited to 'Test')
-rw-r--r--Test/V01zmodload.ztst2
-rw-r--r--Test/V07pcre.ztst3
2 files changed, 2 insertions, 3 deletions
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 ab67f3d80..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
setopt rematch_pcre
# Find a UTF-8 locale.
setopt multibyte