You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests that call more fail in Windows with Unicode shell codepage #11469
test\parallel\test-child-process-stdin.js uses more command and does not expect any error messages in the stderr (see common.mustNotCall()).
However, some core Windows shell commands work wrong with Unicode shell codepage. See this answer.
To check more command:
chcp 65001 && more
Active code page: 65001
Not enough memory.
chcp 1252 && more
Active code page: 1252
[reading from stdio]
To check test\parallel\test-child-process-stdin.js pass:
chcp 65001 && node test\parallel\test-child-process-stdin.js
Active code page: 65001
... AssertionError: function should not have been called ...
chcp 1252 && node test\parallel\test-child-process-stdin.js
Active code page: 1252
stdout: hello world
changed the title [-]test\parallel\test-child-process-stdin.js fails in Windows with Unicode shell codepage[/-][+]Tests that call `more` fail in Windows with Unicode shell codepage[/+]on Feb 20, 2017
I can reproduce this on Windows 7 and 2008R2 but cannot on Windows Server 2012R2. So, this looks like an issue with more (that ships with Windows: C:\Windows\System32\more.com) that has been fixed on Windows 8/2012.
I suspect more is used just because it was never changed to cat, we already require cat (installed by git) to run the tests. I'd be happy to discuss a PR to s/more/cat/, if it works.
Activity
[-]test\parallel\test-child-process-stdin.js fails in Windows with Unicode shell codepage[/-][+]Tests that call `more` fail in Windows with Unicode shell codepage[/+]vsemozhetbyt commentedon Feb 21, 2017
It seems the same with these two tests:
test\parallel\test-child-process-spawn-shell.jscallsmorehere.test\parallel\test-child-process-spawnsync-shell.jscallsmorehere.The same checks:
seishun commentedon Feb 21, 2017
So I guess it should be documented that tests should be run in a non-Unicode codepage.
vsemozhetbyt commentedon Feb 21, 2017
Or maybe the test runner (or a concerned test /
commonlib) should set an appropriate codepage before a run.joaocgreis commentedon Feb 21, 2017
I can reproduce this on Windows 7 and 2008R2 but cannot on Windows Server 2012R2. So, this looks like an issue with
more(that ships with Windows:C:\Windows\System32\more.com) that has been fixed on Windows 8/2012.I suspect
moreis used just because it was never changed tocat, we already requirecat(installed by git) to run the tests. I'd be happy to discuss a PR tos/more/cat/, if it works.TimothyGu commentedon Feb 21, 2017
I can't reproduce this on Windows 8.1 (6.3.9600).
chcp 65001 && moreworks just fine. Changing tocatSGTM.vsemozhetbyt commentedon Feb 22, 2017
See also: #11470
TimothyGu commentedon Mar 20, 2017
@vsemozhetbyt do you want to submit a PR for this?
vsemozhetbyt commentedon Mar 20, 2017
@TimothyGu If @joaocgreis has no plans to do this, I can try. However, I am not good at *nix shell tools so I can overlook something.
joaocgreis commentedon Mar 20, 2017
I've added this to my queue, but I'm not likely to get there soon. Feel free to go ahead, I can help review.
vsemozhetbyt commentedon Mar 21, 2017
@joaocgreis The PR, PTAL.
test: do not use `more` command on Windows
test: do not use `more` command on Windows