Repository navigation
Tests that call more fail in Windows with Unicode shell codepage #11469
Description
Activity
- addedtestIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Feb 20, 2017 - 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 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:
chcp 65001 && node test\parallel\test-child-process-spawnsync-shell.js ... AssertionError: '' === 'bar' ... chcp 1252 && node test\parallel\test-child-process-spawnsync-shell.js [pass] chcp 65001 && node test\parallel\test-child-process-spawn-shell.js ... AssertionError: '' === 'bar' ... chcp 1252 && node test\parallel\test-child-process-spawn-shell.js [pass]So I guess it should be documented that tests should be run in a non-Unicode codepage.
Or maybe the test runner (or a concerned test /
commonlib) should set an appropriate codepage before a run.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.Reacted by Jeremiah Senkpiel and Vse Mozhe ButyI can't reproduce this on Windows 8.1 (6.3.9600).
chcp 65001 && moreworks just fine. Changing tocatSGTM.See also: #11470
@vsemozhetbyt do you want to submit a PR for this?
@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.
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.
Reacted by Vse Mozhe Buty@joaocgreis The PR, PTAL.
Reacted by João Reis- added a commit that references this issue
on Mar 28, 2017 - added a commit that references this issue
on Jul 27, 2026
test\parallel\test-child-process-stdin.jsusesmorecommand and does not expect any error messages in the stderr (seecommon.mustNotCall()).However, some core Windows shell commands work wrong with Unicode shell codepage. See this answer.
To check
morecommand:To check
test\parallel\test-child-process-stdin.jspass: