Add test-stdin-from-file.js and test-stdout-to-file.js to the list of unit tests.

Reviewed-by: asquare
This commit is contained in:
Kinsley Wong 2014-01-07 10:29:33 -08:00
parent a7d8fc121b
commit b4143512ae
5 changed files with 33 additions and 3 deletions

View File

@ -314,6 +314,8 @@
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-readline-interface.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-repl.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-script-context.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stdin-from-file.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stdout-to-file.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stream2-push.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stream2-read-sync-stack.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stream2-readable-empty-buffer-no-eof.js"/>
@ -400,6 +402,8 @@
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-readline-interface.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-repl.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-script-context.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stdin-from-file.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stdout-to-file.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stream2-push.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stream2-read-sync-stack.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stream2-readable-empty-buffer-no-eof.js"/>

View File

@ -1,15 +1,17 @@
--- ../nodejs/test/simple/test-net-GH-5504.js 2014-01-06 13:25:28.924762579 -0800
+++ test/simple/test-net-GH-5504.js 2014-01-06 18:06:06.316917426 -0800
@@ -73,7 +73,7 @@
+++ test/simple/test-net-GH-5504.js 2014-01-06 18:48:54.692941044 -0800
@@ -73,7 +73,9 @@
var serverExited = false;
var clientExited = false;
var serverListened = false;
- var opt = { env: { NODE_DEBUG: 'net' } };
+ // AVATAR_JS-146: The path was getting overridden when the env was
+ // set on the child causing the default version of Java to be used.
+ var opt;
process.on('exit', function() {
assert(serverExited);
@@ -88,7 +88,7 @@
@@ -88,7 +90,7 @@
setTimeout(function() {
throw new Error('hang');
});

View File

@ -0,0 +1,11 @@
--- ../nodejs/test/simple/test-stdin-from-file.js 2013-12-19 22:22:19.827516500 -0800
+++ test/simple/test-stdin-from-file.js 2014-01-06 18:31:59.224650500 -0800
@@ -31,7 +31,7 @@
var stdoutScript = join(common.fixturesDir, 'echo.js');
var tmpFile = join(common.fixturesDir, 'stdin.txt');
-var cmd = '"' + process.argv[0] + '" "' + stdoutScript + '" < "' +
+var cmd = process.argv[0] + ' "' + stdoutScript + '" < "' +
tmpFile + '"';
var string = 'abc\nümlaut.\nsomething else\n' +

View File

@ -0,0 +1,11 @@
--- ../nodejs/test/simple/test-stdout-to-file.js 2013-12-19 22:22:19.905459000 -0800
+++ test/simple/test-stdout-to-file.js 2014-01-06 17:58:00.441999200 -0800
@@ -33,7 +33,7 @@
var tmpFile = path.join(common.tmpDir, 'stdout.txt');
function test(size, useBuffer, cb) {
- var cmd = '"' + process.argv[0] + '"' +
+ var cmd = process.argv[0] +
' ' +
'"' + (useBuffer ? scriptBuffer : scriptString) + '"' +
' ' +

View File

@ -489,6 +489,7 @@ source.test.simple.list = \
test-socket-write-after-fin-error.js \
test-socket-write-after-fin.js \
test-stdin-child-proc.js \
test-stdin-from-file.js \
test-stdin-hang.js \
test-stdin-pause-resume.js \
test-stdin-pause-resume-sync.js \
@ -496,6 +497,7 @@ source.test.simple.list = \
test-stdin-resume-pause.js \
test-stdio-readable-writable.js \
test-stdout-close-unref.js \
test-stdout-to-file.js \
test-stream-big-push.js \
test-stream-pipe-after-end.js \
test-stream-pipe-cleanup.js \