Browse Source

Merge branch 'master' into net2

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
faffee0c62
  1. 2
      benchmark/http_simple.js
  2. 8
      benchmark/process_loop.js
  3. 14
      benchmark/run.js
  4. 6
      benchmark/static_http_server.js
  5. 3
      bin/node-repl
  6. 1
      deps/libev/wscript
  7. 1
      deps/v8/SConstruct
  8. 3
      doc/api.txt
  9. 6
      lib/fs.js
  10. 8
      src/node.js
  11. 6
      test/common.js
  12. 2
      test/disabled/test-cat.js
  13. 2
      test/disabled/test-dns.js
  14. 2
      test/disabled/test-eio-race3.js
  15. 2
      test/disabled/test-fs-sendfile.js
  16. 2
      test/disabled/test-http-stress.js
  17. 2
      test/fixtures/echo.js
  18. 2
      test/fixtures/print-chars.js
  19. 2
      test/pummel/test-http-client-reconnect-bug.js
  20. 2
      test/pummel/test-keep-alive.js
  21. 2
      test/pummel/test-multipart.js
  22. 2
      test/pummel/test-process-spawn-loop.js
  23. 2
      test/pummel/test-tcp-many-clients.js
  24. 2
      test/pummel/test-tcp-pause.js
  25. 2
      test/pummel/test-tcp-pingpong-delay.js
  26. 2
      test/pummel/test-tcp-pingpong.js
  27. 2
      test/pummel/test-tcp-throttle.js
  28. 2
      test/pummel/test-tcp-timeout.js
  29. 2
      test/pummel/test-tcp-tls.js
  30. 2
      test/pummel/test-timers.js
  31. 2
      test/pummel/test-watch-file.js
  32. 2
      test/simple/test-assert.js
  33. 2
      test/simple/test-byte-length.js
  34. 2
      test/simple/test-chdir.js
  35. 2
      test/simple/test-child-process-env.js
  36. 2
      test/simple/test-delayed-require.js
  37. 2
      test/simple/test-eio-race.js
  38. 2
      test/simple/test-eio-race2.js
  39. 2
      test/simple/test-eio-race4.js
  40. 2
      test/simple/test-event-emitter-add-listeners.js
  41. 8
      test/simple/test-event-emitter-modify-in-emit.js
  42. 2
      test/simple/test-exception-handler.js
  43. 2
      test/simple/test-exec.js
  44. 2
      test/simple/test-file-read-noexist.js
  45. 2
      test/simple/test-file-read-stream.js
  46. 2
      test/simple/test-file-write-stream.js
  47. 2
      test/simple/test-fs-chmod.js
  48. 2
      test/simple/test-fs-realpath.js
  49. 2
      test/simple/test-fs-stat.js
  50. 2
      test/simple/test-fs-symlink.js
  51. 2
      test/simple/test-fs-write.js
  52. 2
      test/simple/test-http-1.0.js
  53. 2
      test/simple/test-http-cat.js
  54. 2
      test/simple/test-http-chunked.js
  55. 2
      test/simple/test-http-client-race.js
  56. 2
      test/simple/test-http-client-upload.js
  57. 2
      test/simple/test-http-eof-on-connect.js
  58. 2
      test/simple/test-http-malformed-request.js
  59. 2
      test/simple/test-http-proxy.js
  60. 2
      test/simple/test-http-server.js
  61. 2
      test/simple/test-http-tls.js
  62. 2
      test/simple/test-http-wget.js
  63. 2
      test/simple/test-http.js
  64. 2
      test/simple/test-idle-watcher.js
  65. 2
      test/simple/test-ini.js
  66. 2
      test/simple/test-memory-usage.js
  67. 2
      test/simple/test-mkdir-rmdir.js
  68. 2
      test/simple/test-module-loading.js
  69. 2
      test/simple/test-next-tick.js
  70. 2
      test/simple/test-path.js
  71. 2
      test/simple/test-process-buffering.js
  72. 2
      test/simple/test-process-kill.js
  73. 2
      test/simple/test-process-mixin.js
  74. 2
      test/simple/test-process-simple.js
  75. 2
      test/simple/test-querystring.js
  76. 2
      test/simple/test-readdir.js
  77. 2
      test/simple/test-remote-module-loading.js
  78. 2
      test/simple/test-signal-handler.js
  79. 2
      test/simple/test-stdio.js
  80. 2
      test/simple/test-stdout-flush.js
  81. 2
      test/simple/test-sync-fileread.js
  82. 3
      test/simple/test-sys.js
  83. 2
      test/simple/test-tcp-binary.js
  84. 2
      test/simple/test-tcp-reconnect.js
  85. 2
      test/simple/test-umask.js
  86. 2
      test/simple/test-url.js
  87. 2
      test/simple/test-utf8-scripts.js
  88. 4
      tools/wafadmin/Tools/config_c.py

2
benchmark/http_simple.js

@ -3,7 +3,7 @@ path = require("path");
libDir = path.join(path.dirname(__filename), "../lib"); libDir = path.join(path.dirname(__filename), "../lib");
require.paths.unshift(libDir); require.paths.unshift(libDir);
process.mixin(require("sys")); var puts = require("sys").puts;
http = require("http"); http = require("http");
fixed = "" fixed = ""

8
benchmark/process_loop.js

@ -1,14 +1,12 @@
var path = require("path"); var sys = require("../lib/sys");
libDir = path.join(path.dirname(__filename), "../lib");
require.paths.unshift(libDir);
process.mixin(require("sys"));
function next (i) { function next (i) {
if (i <= 0) return; if (i <= 0) return;
var child = process.createChildProcess("echo", ["hello"]); var child = process.createChildProcess("echo", ["hello"]);
child.addListener("output", function (chunk) { child.addListener("output", function (chunk) {
if (chunk) print(chunk); if (chunk) sys.print(chunk);
}); });
child.addListener("exit", function (code) { child.addListener("exit", function (code) {

14
benchmark/run.js

@ -1,17 +1,15 @@
var path = require("path"); var path = require("path");
libDir = path.join(path.dirname(__filename), "../lib"); var sys = require("../lib/sys");
require.paths.unshift(libDir);
process.mixin(require("sys"));
var benchmarks = [ "static_http_server.js" var benchmarks = [ "static_http_server.js"
, "timers.js" , "timers.js"
, "process_loop.js" , "process_loop.js"
]; ];
var benchmark_dir = path.dirname(__filename); var benchmarkDir = path.dirname(__filename);
function exec (script, callback) { function exec (script, callback) {
var start = new Date(); var start = new Date();
var child = process.createChildProcess(process.ARGV[0], [path.join(benchmark_dir, script)]); var child = process.createChildProcess(process.ARGV[0], [path.join(benchmarkDir, script)]);
child.addListener("exit", function (code) { child.addListener("exit", function (code) {
var elapsed = new Date() - start; var elapsed = new Date() - start;
callback(elapsed, code); callback(elapsed, code);
@ -20,12 +18,12 @@ function exec (script, callback) {
function runNext (i) { function runNext (i) {
if (i >= benchmarks.length) return; if (i >= benchmarks.length) return;
print(benchmarks[i] + ": "); sys.print(benchmarks[i] + ": ");
exec(benchmarks[i], function (elapsed, code) { exec(benchmarks[i], function (elapsed, code) {
if (code != 0) { if (code != 0) {
puts("ERROR "); sys.puts("ERROR ");
} }
puts(elapsed); sys.puts(elapsed);
runNext(i+1); runNext(i+1);
}); });
}; };

6
benchmark/static_http_server.js

@ -1,7 +1,5 @@
var path = require("path"); var http = require("../lib/http");
libDir = path.join(path.dirname(__filename), "../lib");
require.paths.unshift(libDir);
http = require("http");
var concurrency = 30; var concurrency = 30;
var port = 8000; var port = 8000;
var n = 700; var n = 700;

3
bin/node-repl

@ -1,6 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
process.mixin(require('sys')); puts = require("sys").puts;
puts("Welcome to the Node.js REPL."); puts("Welcome to the Node.js REPL.");
puts("Enter ECMAScript at the prompt."); puts("Enter ECMAScript at the prompt.");
puts("Tip 1: Use 'rlwrap node-repl' for a better interface"); puts("Tip 1: Use 'rlwrap node-repl' for a better interface");

1
deps/libev/wscript

@ -49,7 +49,6 @@ def configure(conf):
int main() { int main() {
struct timespec ts; struct timespec ts;
int status = syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts); int status = syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts);
puts("1"); // fucking waf...
return 0; return 0;
} }
""" """

1
deps/v8/SConstruct

@ -267,7 +267,6 @@ V8_EXTRA_FLAGS = {
'gcc': { 'gcc': {
'all': { 'all': {
'WARNINGFLAGS': ['-Wall', 'WARNINGFLAGS': ['-Wall',
'-Werror',
'-W', '-W',
'-Wno-unused-parameter', '-Wno-unused-parameter',
'-Wnon-virtual-dtor'] '-Wnon-virtual-dtor']

3
doc/api.txt

@ -263,6 +263,9 @@ server.addListener("connection", function (socket) {
Remove a listener from the listener array for the specified event. Remove a listener from the listener array for the specified event.
*Caution*: changes array indices in the listener array behind the listener. *Caution*: changes array indices in the listener array behind the listener.
+emitter.removeAllListeners(event)+ ::
Removes all listeners from the listener array for the specified event.
+emitter.listeners(event)+ :: +emitter.listeners(event)+ ::
Returns an array of listeners for the specified event. This array can be Returns an array of listeners for the specified event. This array can be
manipulated, e.g. to remove listeners. manipulated, e.g. to remove listeners.

6
lib/fs.js

@ -444,7 +444,8 @@ var FileReadStream = exports.FileReadStream = function(path, options) {
this.mode = 0666; this.mode = 0666;
this.bufferSize = 4 * 1024; this.bufferSize = 4 * 1024;
process.mixin(this, options || {}); options = options || {};
for (var i in options) this[i] = options[i];
var var
self = this, self = this,
@ -555,7 +556,8 @@ var FileWriteStream = exports.FileWriteStream = function(path, options) {
this.encoding = 'binary'; this.encoding = 'binary';
this.mode = 0666; this.mode = 0666;
process.mixin(this, options || {}); options = options || {};
for (var i in options) this[i] = options[i];
var var
self = this, self = this,

8
src/node.js

@ -13,7 +13,7 @@ function removed (reason) {
} }
GLOBAL.__module = removed("'__module' has been renamed to 'module'"); GLOBAL.__module = removed("'__module' has been renamed to 'module'");
GLOBAL.include = removed("include(module) has been removed. Use process.mixin(GLOBAL, require(module)) to get the same effect."); GLOBAL.include = removed("include(module) has been removed. Use require(module)");
GLOBAL.puts = removed("puts() has moved. Use require('sys') to bring it back."); GLOBAL.puts = removed("puts() has moved. Use require('sys') to bring it back.");
GLOBAL.print = removed("print() has moved. Use require('sys') to bring it back."); GLOBAL.print = removed("print() has moved. Use require('sys') to bring it back.");
GLOBAL.p = removed("p() has moved. Use require('sys') to bring it back."); GLOBAL.p = removed("p() has moved. Use require('sys') to bring it back.");
@ -186,6 +186,12 @@ var eventsModule = createInternalModule('events', function (exports) {
return this; return this;
}; };
process.EventEmitter.prototype.removeAllListeners = function (type) {
// does not use listeners(), so no side effect of creating _events[type]
if (!type || !this._events || !this._events.hasOwnProperty(type)) return this;
this._events[type].length = 0;
};
process.EventEmitter.prototype.listeners = function (type) { process.EventEmitter.prototype.listeners = function (type) {
if (!this._events) this._events = {}; if (!this._events) this._events = {};
if (!this._events.hasOwnProperty(type)) this._events[type] = []; if (!this._events.hasOwnProperty(type)) this._events[type] = [];

6
test/common.js

@ -1,5 +1,7 @@
var path = require("path"); var path = require("path");
exports = module.exports = global;
exports.testDir = path.dirname(__filename); exports.testDir = path.dirname(__filename);
exports.fixturesDir = path.join(exports.testDir, "fixtures"); exports.fixturesDir = path.join(exports.testDir, "fixtures");
exports.libDir = path.join(exports.testDir, "../lib"); exports.libDir = path.join(exports.testDir, "../lib");
@ -7,8 +9,6 @@ exports.PORT = 12346;
require.paths.unshift(exports.libDir); require.paths.unshift(exports.libDir);
var assert = require('assert');
var sys = require("sys"); var sys = require("sys");
for (var i in sys) exports[i] = sys[i];
process.mixin(exports, sys);
exports.assert = require('assert'); exports.assert = require('assert');

2
test/disabled/test-cat.js

@ -1,4 +1,4 @@
process.mixin(require("../common.js")); require("../common.js");
http = require("/http.js"); http = require("/http.js");
puts("hello world"); puts("hello world");

2
test/disabled/test-dns.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var dns = require("dns"), var dns = require("dns"),
sys = require("sys"); sys = require("sys");

2
test/disabled/test-eio-race3.js

@ -1,6 +1,6 @@
/* XXX Can this test be modified to not call the now-removed wait()? */ /* XXX Can this test be modified to not call the now-removed wait()? */
process.mixin(require("../common")); require("../common");
puts('first stat ...'); puts('first stat ...');

2
test/disabled/test-fs-sendfile.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
sys = require("sys"); sys = require("sys");

2
test/disabled/test-http-stress.js

@ -1,4 +1,4 @@
process.mixin(require('../common.js')); require("../common");
var request_count = 1000; var request_count = 1000;
var response_body = '{"ok": true}'; var response_body = '{"ok": true}';

2
test/fixtures/echo.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
process.stdio.open(); process.stdio.open();
print("hello world\r\n"); print("hello world\r\n");

2
test/fixtures/print-chars.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var n = parseInt(process.argv[2]); var n = parseInt(process.argv[2]);

2
test/pummel/test-http-client-reconnect-bug.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var tcp = require("tcp"), var tcp = require("tcp"),
sys = require("sys"), sys = require("sys"),

2
test/pummel/test-keep-alive.js

@ -1,5 +1,5 @@
// This test requires the program "ab" // This test requires the program "ab"
process.mixin(require("../common")); require("../common");
http = require("http"); http = require("http");
sys = require("sys"); sys = require("sys");

2
test/pummel/test-multipart.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var http = require("http"), var http = require("http"),
multipart = require("multipart"), multipart = require("multipart"),

2
test/pummel/test-process-spawn-loop.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var N = 40; var N = 40;
var finished = false; var finished = false;

2
test/pummel/test-tcp-many-clients.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
// settings // settings
var bytes = 1024*40; var bytes = 1024*40;

2
test/pummel/test-tcp-pause.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
N = 200; N = 200;

2
test/pummel/test-tcp-pingpong-delay.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");

2
test/pummel/test-tcp-pingpong.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
var tests_run = 0; var tests_run = 0;

2
test/pummel/test-tcp-throttle.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
N = 60*1024; // 30kb N = 60*1024; // 30kb

2
test/pummel/test-tcp-timeout.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
exchanges = 0; exchanges = 0;
starttime = null; starttime = null;

2
test/pummel/test-tcp-tls.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
fs=require("fs"); fs=require("fs");

2
test/pummel/test-timers.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var WINDOW = 200; // why is does this need to be so big? var WINDOW = 200; // why is does this need to be so big?

2
test/pummel/test-watch-file.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var fs = require("fs"); var fs = require("fs");
var path = require("path"); var path = require("path");

2
test/simple/test-assert.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var a = require('assert'); var a = require('assert');

2
test/simple/test-byte-length.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
assert.equal(14, process._byteLength("Il était tué")); assert.equal(14, process._byteLength("Il était tué"));
assert.equal(14, process._byteLength("Il était tué", "utf8")); assert.equal(14, process._byteLength("Il était tué", "utf8"));

2
test/simple/test-chdir.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
assert.equal(true, process.cwd() !== __dirname); assert.equal(true, process.cwd() !== __dirname);

2
test/simple/test-child-process-env.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
child = process.createChildProcess('/usr/bin/env', [], {'HELLO' : 'WORLD'}); child = process.createChildProcess('/usr/bin/env', [], {'HELLO' : 'WORLD'});
response = ""; response = "";

2
test/simple/test-delayed-require.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
setTimeout(function () { setTimeout(function () {
a = require("../fixtures/a"); a = require("../fixtures/a");

2
test/simple/test-eio-race.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var count = 100; var count = 100;
var fs = require('fs'); var fs = require('fs');

2
test/simple/test-eio-race2.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var testTxt = path.join(fixturesDir, "x.txt"); var testTxt = path.join(fixturesDir, "x.txt");
var fs = require('fs'); var fs = require('fs');

2
test/simple/test-eio-race4.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var fs = require('fs'); var fs = require('fs');
var N = 100; var N = 100;
var j = 0; var j = 0;

2
test/simple/test-event-emitter-add-listeners.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var events = require('events'); var events = require('events');
var e = new events.EventEmitter(); var e = new events.EventEmitter();

8
test/simple/test-event-emitter-modify-in-emit.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var events = require('events'); var events = require('events');
var callbacks_called = [ ]; var callbacks_called = [ ];
@ -30,3 +30,9 @@ assert.deepEqual(["callback1", "callback2"], callbacks_called);
e.emit("foo"); e.emit("foo");
assert.equal(0, e.listeners("foo").length); assert.equal(0, e.listeners("foo").length);
assert.deepEqual(["callback1", "callback2"], callbacks_called); assert.deepEqual(["callback1", "callback2"], callbacks_called);
e.addListener("foo", callback1);
e.addListener("foo", callback2);
assert.equal(2, e.listeners("foo").length)
e.removeAllListeners("foo")
assert.equal(0, e.listeners("foo").length)

2
test/simple/test-exception-handler.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var MESSAGE = 'catch me if you can'; var MESSAGE = 'catch me if you can';
var caughtException = false; var caughtException = false;

2
test/simple/test-exec.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
success_count = 0; success_count = 0;
error_count = 0; error_count = 0;

2
test/simple/test-file-read-noexist.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');
var got_error = false; var got_error = false;

2
test/simple/test-file-read-stream.js

@ -1,4 +1,4 @@
process.mixin(require('../common')); require('../common');
var var
path = require('path'), path = require('path'),

2
test/simple/test-file-write-stream.js

@ -1,4 +1,4 @@
process.mixin(require('../common')); require('../common');
var var
path = require('path'), path = require('path'),

2
test/simple/test-fs-chmod.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');
var got_error = false; var got_error = false;

2
test/simple/test-fs-realpath.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
var async_completed = 0, async_expected = 0, unlink = []; var async_completed = 0, async_expected = 0, unlink = [];

2
test/simple/test-fs-stat.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var fs = require('fs'); var fs = require('fs');
var got_error = false; var got_error = false;
var success_count = 0; var success_count = 0;

2
test/simple/test-fs-symlink.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');
var completed = 0; var completed = 0;

2
test/simple/test-fs-write.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');
var fn = path.join(fixturesDir, "write.txt"); var fn = path.join(fixturesDir, "write.txt");

2
test/simple/test-http-1.0.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
http = require("http"); http = require("http");

2
test/simple/test-http-cat.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
http = require("http"); http = require("http");
var body = "exports.A = function() { return 'A';}"; var body = "exports.A = function() { return 'A';}";

2
test/simple/test-http-chunked.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var http = require("http"); var http = require("http");
var UTF8_STRING = "Il était tué"; var UTF8_STRING = "Il était tué";

2
test/simple/test-http-client-race.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
http = require("http"); http = require("http");
url = require("url"); url = require("url");

2
test/simple/test-http-client-upload.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
http = require("http"); http = require("http");
var sent_body = ""; var sent_body = "";

2
test/simple/test-http-eof-on-connect.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
http = require("http"); http = require("http");

2
test/simple/test-http-malformed-request.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
http = require("http"); http = require("http");
url = require("url"); url = require("url");

2
test/simple/test-http-proxy.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
http = require("http"); http = require("http");
url = require("url"); url = require("url");

2
test/simple/test-http-server.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
http = require("http"); http = require("http");
url = require("url"); url = require("url");

2
test/simple/test-http-tls.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var http = require("http"); var http = require("http");
var url = require("url"); var url = require("url");
var fs = require('fs'); var fs = require('fs');

2
test/simple/test-http-wget.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
http = require("http"); http = require("http");

2
test/simple/test-http.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
http = require("http"); http = require("http");
url = require("url"); url = require("url");

2
test/simple/test-idle-watcher.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var complete = false; var complete = false;
var idle = new process.IdleWatcher(); var idle = new process.IdleWatcher();

2
test/simple/test-ini.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var fs = require("fs"); var fs = require("fs");
parse = require("ini").parse; parse = require("ini").parse;

2
test/simple/test-memory-usage.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var r = process.memoryUsage(); var r = process.memoryUsage();
puts(inspect(r)); puts(inspect(r));

2
test/simple/test-mkdir-rmdir.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');

2
test/simple/test-module-loading.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
debug("load test-module-loading.js"); debug("load test-module-loading.js");

2
test/simple/test-next-tick.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var complete = 0; var complete = 0;

2
test/simple/test-path.js

@ -1,5 +1,5 @@
var path = require("path"); var path = require("path");
process.mixin(require("../common")); require("../common");
var f = __filename; var f = __filename;

2
test/simple/test-process-buffering.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var pwd_called = false; var pwd_called = false;

2
test/simple/test-process-kill.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var exit_status = -1; var exit_status = -1;

2
test/simple/test-process-mixin.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var target = function() {}; var target = function() {};
process.mixin(target, { process.mixin(target, {

2
test/simple/test-process-simple.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var cat = process.createChildProcess("cat"); var cat = process.createChildProcess("cat");

2
test/simple/test-querystring.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
// test using assert // test using assert

2
test/simple/test-readdir.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');

2
test/simple/test-remote-module-loading.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var http = require('http'); var http = require('http');
var sys = require('sys'); var sys = require('sys');

2
test/simple/test-signal-handler.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
puts("process.pid: " + process.pid); puts("process.pid: " + process.pid);

2
test/simple/test-stdio.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var sub = path.join(fixturesDir, 'echo.js'); var sub = path.join(fixturesDir, 'echo.js');

2
test/simple/test-stdout-flush.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var path = require('path'); var path = require('path');
var sub = path.join(fixturesDir, 'print-chars.js'); var sub = path.join(fixturesDir, 'print-chars.js');

2
test/simple/test-sync-fileread.js

@ -1,4 +1,4 @@
process.mixin(require('../common')); require('../common');
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');

3
test/simple/test-sys.js

@ -1,5 +1,4 @@
process.mixin(require("../common")); require("../common");
process.mixin(require("sys"));
assert.equal("0", inspect(0)); assert.equal("0", inspect(0));
assert.equal("1", inspect(1)); assert.equal("1", inspect(1));

2
test/simple/test-tcp-binary.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
binaryString = ""; binaryString = "";

2
test/simple/test-tcp-reconnect.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
tcp = require("tcp"); tcp = require("tcp");
var N = 50; var N = 50;

2
test/simple/test-umask.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var mask = 0664; var mask = 0664;
var old = process.umask(mask); var old = process.umask(mask);

2
test/simple/test-url.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
var url = require("url"), var url = require("url"),
sys = require("sys"); sys = require("sys");

2
test/simple/test-utf8-scripts.js

@ -1,4 +1,4 @@
process.mixin(require("../common")); require("../common");
// üäö // üäö

4
tools/wafadmin/Tools/config_c.py

@ -541,8 +541,10 @@ def run_c_code(self, *k, **kw):
# if we need to run the program, try to get its result # if we need to run the program, try to get its result
if kw['execute']: if kw['execute']:
ak = {} # syntax for python < 2.5, don't touch
ak['stdout'] = ak['stderr'] = Utils.pproc.PIPE
args = Utils.to_list(kw.get('exec_args', [])) args = Utils.to_list(kw.get('exec_args', []))
proc = Utils.pproc.Popen([lastprog], *args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) proc = Utils.pproc.Popen([lastprog], *args, **ak)
(out, err) = proc.communicate() (out, err) = proc.communicate()
w = self.log.write w = self.log.write
w(str(out)) w(str(out))

Loading…
Cancel
Save