Subject: Re: [PATCH 0/6] test: make the test suite work with zsh

From: "brian m. carlson" <[email-masked]>
Date: Wed, 29 Mar 2023 00:57:45 +0000

On 2023-03-28 at 17:39:26, Felipe Contreras wrote:
> It's not difficult to make the testing library work for zsh, so I did that in
> the first patch.
> 
> The rest of the patches are basically to deal with some variables that are
> special in zsh, workaround a bug, and a minor discrepancy.

There was a point at which the tests worked entirely in sh mode with
zsh.  I know because I fixed a handful of tests there, ending with
c64368e3a2a47, and I patched zsh to run all commands in a pipeline in a
subshell in sh mode to fix the remaining tests.

If I symlink zsh (zsh 5.9 (x86_64-debian-linux-gnu)) to sh in a
temporary directory and use it in SHELL_PATH, I get only the following
failures:

  t4046-diff-unmerged.sh                           (Wstat: 256 (exited 1) Tests: 6 Failed: 5)
    Failed tests:  2-6
    Non-zero exit status: 1
  t7609-mergetool--lib.sh                          (Wstat: 256 (exited 1) Tests: 1 Failed: 1)
    Failed test:  1
    Non-zero exit status: 1

I haven't investigated further.

I don't care a lot of other folks want to make zsh run the testsuite in
zsh mode, but I'd think that using sh mode would be simpler and less
likely to break in general, and would avoid us needing to carry a lot of
patches to work around various variables that are special in zsh mode.
It would also be easier to potentially test in the testsuite as well.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA