On Fri, Oct 30, 2015 at 3:55 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> No, but it could be some TCC magic, aimed at intercepting any explicit
> references to cmd.exe.

I think you're right. Running the let-binding variant under CMD.EXE works as expected (the called process receives the right COMSPEC value).

> What happens if you replace test.bat with a compiled C program that
> calls getenv to look at these two variables -- do you see the same
> there? 

Both in TCC.EXE and CMD.EXE the let-binding works correctly.

I don't think there's anything more to do here, other than perhaps adding a note somewhere that the test doesn't work under TCC.