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

Re: 5.8: test suite is failing



On Mon, May 10, 2021 at 1:26 PM Tomasz Kłoczko <kloczko.tomasz@xxxxxxxxx> wrote:
>
> Test ./C04funcdef.ztst failed: bad status 1, expected 0 from:
>   # keep spec from getting loaded in parent shell for simplicity
>   (
>     if whence spec; then print spec already loaded >&2; exit 1; fi

Do you have a command named "spec" somewhere in your $PATH when
running this "make"?

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




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