镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/parallel/test-child-process-spawnsync-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,11 @@ assert.ok(ret.error, 'maxBuffer should error');
assert.strictEqual(ret.error.errno, 'ENOBUFS');
// we can have buffers larger than maxBuffer because underneath we alloc 64k
// that matches our read sizes
assert.deepEqual(ret.stdout, msgOutBuf);

// While we are writing to stdout first which is expected to
// overflow the buffer and cause child to return, the actual
// write order can be reversed based on how uv loop get them.
// So expect either stdout or stderr to be holding the data
assert.ok(ret.stdout.toString() === msgOutBuf.toString() ||
ret.stderr.toString() === msgErrBuf.toString(),
'expected at least one stream to write back.');