summaryrefslogtreecommitdiffstats
path: root/Test/C04funcdef.ztst
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-05-15 13:45:14 -0700
committerBart Schaefer <schaefer@ipost.com>2021-05-15 13:45:14 -0700
commit34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf (patch)
treebbcc7c40c8c3626a6d3b8b3998897d0ca2974df5 /Test/C04funcdef.ztst
parent48790: COMPLETE_IN_WORD inside brace-param (diff)
downloadzsh-34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf.tar
zsh-34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf.tar.gz
zsh-34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf.tar.bz2
zsh-34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf.tar.lz
zsh-34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf.tar.xz
zsh-34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf.tar.zst
zsh-34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf.zip
48810: fix potential name clash in test case for autoloading
Diffstat (limited to 'Test/C04funcdef.ztst')
-rw-r--r--Test/C04funcdef.ztst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst
index 407fc471f..88321c432 100644
--- a/Test/C04funcdef.ztst
+++ b/Test/C04funcdef.ztst
@@ -508,7 +508,8 @@
# keep spec from getting loaded in parent shell for simplicity
(
- if whence spec; then print spec already loaded >&2; exit 1; fi
+ if [[ $(whence -v spec) = 'spec is a shell function from '$PWD/* ]]
+ then print spec already loaded >&2; exit 1; fi
autoload -Uz $PWD/spec
autoload -Uz $PWD/extra/spec
spec
@@ -517,7 +518,8 @@
>I have been loaded by explicit path.
(
- if whence spec; then print spec already loaded >&2; exit 1; fi
+ if [[ $(whence -v spec) = 'spec is a shell function from '$PWD/* ]]
+ then print spec already loaded >&2; exit 1; fi
autoload -Uz $PWD/extra/spec
autoload spec
spec