From 34a8fecf7bba9a03e495d1f0bb3cade6ca2fa2bf Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 15 May 2021 13:45:14 -0700 Subject: 48810: fix potential name clash in test case for autoloading --- ChangeLog | 2 ++ Test/C04funcdef.ztst | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7a602e68..aea01b6c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2021-05-15 Bart Schaefer + * 48810: Test/C04funcdef.ztst: name clash in test for autoloading + * 48790: Src/Zle/compcore.c: COMPLETE_IN_WORD inside brace-param * 48710: Completion/Zsh/Command/_zed, Doc/Zsh/contrib.yo, 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 -- cgit 1.4.1