98: reintroduce fd validation now that npm breakage is fixed

Reviewed-by: jfdenise
This commit is contained in:
akhil 2013-12-06 13:50:59 -08:00
parent c6a314129e
commit b0ea33034d
2 changed files with 32 additions and 0 deletions

View File

@ -288,6 +288,7 @@
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-dgram-unref.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-domain.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-error-reporting.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-fs-read-stream.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-fs-readfile-pipe.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-http.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-http-client-timeout-agent.js"/>
@ -365,6 +366,7 @@
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-dgram-unref.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-domain.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-error-reporting.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-fs-read-stream.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-fs-readfile-pipe.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-http.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-http-client-timeout-agent.js"/>

View File

@ -0,0 +1,30 @@
--- ../node/test/simple/test-fs-read-stream.js 2013-09-03 10:31:21 -0700
+++ test/simple//test-fs-read-stream.js 2013-12-04 16:41:10 -0800
@@ -174,10 +174,11 @@
});
}
+// disabled: avatar-js cannot read from arbitrary fds
// Just to make sure autoClose won't close the stream because of error.
-var file8 = fs.createReadStream(null, {fd: 13337, autoClose: false });
-file8.on('data', function() {});
-file8.on('error', common.mustCall(function() {}));
+//var file8 = fs.createReadStream(null, {fd: 13337, autoClose: false });
+//file8.on('data', function() {});
+//file8.on('error', common.mustCall(function() {}));
// Make sure stream is destroyed when file does not exist.
var file9 = fs.createReadStream('/path/to/file/that/does/not/exist');
@@ -188,9 +189,9 @@
assert(file7.closed);
assert(file7.destroyed);
- assert(!file8.closed);
- assert(!file8.destroyed);
- assert(file8.fd);
+// assert(!file8.closed);
+// assert(!file8.destroyed);
+// assert(file8.fd);
assert(!file9.closed);
assert(file9.destroyed);