On Mon, Jul 22, 2019 at 5:55 AM <
sha...@gmail.com> wrote:
> I've found the cause of the problem. On my MacOS, running `./do
> test` selects zsh as the "mostly good shell". This is zsh that I
> have:
>
> $ zsh --version
> zsh 5.3 (x86_64-apple-darwin18.0)
>
> For unclear reason, `minimal/do` is not running zsh in sh
> compatible mode. Which causes `_normpath` function to return
> incorrect result, because it ignores `IFS=/` line:
>
> NP start path='/Users/asha/src/redo/test/' relto='/Users/asha/src/redo'
> NP out='/Users/asha/src/redo/test//' (done)
>
> While it should be (note the double slash above):
>
> NP start path='/Users/asha/src/redo/test/' relto='/Users/asha/src/redo'
> NP out='/Users/asha/src/redo/test/' (done)
Hey, thanks for tracking this down! I was able to get a copy of zsh
5.3 and reproduce the problem.
Interestingly, you were wrong about one thing: it *was* running in
compatibility mode, but its compatibility mode apparently has a bug.
with IFS=/, most shells will split "/a/b/c" into four parts (blank,
a, b, c) but zsh (in sh mode) will split it into five parts (blank,
a, b, c, blank).
I added a workaround to minimal/do, and a warning to shelltest.od. (I
wasn't quite willing to make this a 'fail', although it should be,
since every other shell I have can agree on the right answer).
> ./do: minimal/do test failed
>
> Any ideas on how to proceed?
For what it's work, if you just run
./do build
it won't run the tests, but you still have a working version of redo
afterward. Only minimal/do was acting weird. Once that works, you can
even run the tests under the full version of redo:
bin/redo -j10 test
and it should pass.
Anyway, it should be fixed now. Please test :)
Thanks,
Avery