win,test: fix test-stdin-from-file
authorBert Belder <bertbelder@gmail.com>
Thu, 5 Mar 2015 02:11:06 +0000 (03:11 +0100)
committerBert Belder <bertbelder@gmail.com>
Thu, 5 Mar 2015 14:30:52 +0000 (15:30 +0100)
commitabd3ecfbd196c65835d13473d479827b6bce424b
tree4f9fdb0932c63a50f95a0a01e3c3c4f1076771c6
parent4d0329ebeb5d58702be9450e0706e0f2c404848d
win,test: fix test-stdin-from-file

The test-stdin-from-from-file test runs a subprocess that verifies stdin
can be piped from a file.

The subprocess additionally attempts to verify that the file descriptor
for stdin never gets closed. It used to do this by creating a TCP server
and asserting that the associated file descriptor is greater than two.
However this strategy doesn't work on windows, because servers don't
have an associated file descriptor. With this patch an ordinary file is
opened instead of creating a server.

PR: https://github.com/iojs/io.js/pull/1067
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
test/fixtures/echo-close-check.js