};
-
-
-
-
const commands = [
[
'run (r)',
};
-
exports.ServerResponse = ServerResponse;
ServerResponse.prototype.statusCode = 200;
}
-
// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes. This is to work around cases where hwm=0,
dest._events.error = [onerror, dest._events.error];
-
// Both close and finish should trigger unpipe, but only once.
function onclose() {
dest.removeListener('finish', onfinish);
};
-
// exposed for testing purposes only.
Readable._fromList = fromList;
Decipheriv.prototype.setAAD = Cipher.prototype.setAAD;
-
exports.createSign = exports.Sign = Sign;
function Sign(algorithm, options) {
if (!(this instanceof Sign))
};
-
exports.createVerify = exports.Verify = Verify;
function Verify(algorithm, options) {
if (!(this instanceof Verify))
};
-
exports.pbkdf2 = function(password,
salt,
iterations,
};
-
var pool;
function allocNewPool(poolSize) {
}
-
fs.createReadStream = function(path, options) {
return new ReadStream(path, options);
};
};
-
-
fs.createWriteStream = function(path, options) {
return new WriteStream(path, options);
};
};
-
function afterConnect(status, handle, req, readable, writable) {
var self = handle.owner;
exports.Interface = Interface;
-
/**
* accepts a readable Stream instance and makes it emit "keypress" events
*/
Stream.Stream = Stream;
-
// old-style streams. Note that the pipe method (the only relevant
// part of this class) is overridden in the Readable class.
};
-
function WriteStream(fd) {
if (!(this instanceof WriteStream)) return new WriteStream(fd);
net.Socket.call(this, {
}
-
// gzip - bigger header, same deflate compression
function Gzip(opts) {
if (!(this instanceof Gzip)) return new Gzip(opts);
}
-
// raw - no header
function DeflateRaw(opts) {
if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts);
});
-
-
-
process.on('exit', function() {
assert.ok(gotTimeout0);
assert.ok(!gotConnect0);
assert.doesNotThrow(function() {
assert.strictEqual(util.inspect(b), expected);
assert.strictEqual(util.inspect(s), expected);
-});
\ No newline at end of file
+});
assert.equal(b, d.parent);
-
// Bug regression test
var testValue = '\u00F6\u65E5\u672C\u8A9E'; // ö日本語
var buffer = new Buffer(32);
*/
-
// pipe echo | grep
echo.stdout.on('data', function(data) {
console.error('grep stdin write ' + data.length);
});
-
// pipe grep | sed
grep.stdout.on('data', function(data) {
console.error('grep stdout ' + data.length);
});
-
var result = '';
// print sed's output
});
-
var errorScript = path.join(common.fixturesDir,
'child_process_should_emit_error.js');
var errorChild = spawn(process.argv[0], [errorScript]);
});
-
process.on('exit', function() {
console.error('exit', caught, expectCaught);
assert.equal(caught, expectCaught, 'caught the expected number of errors');
});
-
// revert to using the domain when a callback is passed to nextTick in
// the middle of a tickCallback loop
d.run(function() {
expectCaught++;
-
// catch thrown errors no matter how many times we enter the event loop
// this only uses implicit binding, except for the first function
// passed to d.run(). The rest are implicitly bound by virtue of being
expectCaught++;
-
// implicit addition of a timer created within a domain-bound context.
d.run(function() {
setTimeout(function() {
expectCaught++;
-
// Event emitters added to the domain have their errors routed.
d.add(e);
e.emit('error', new Error('emitted'));
expectCaught++;
-
// get rid of the `if (er) return cb(er)` malarky, by intercepting
// the cb functions to the domain, and using the intercepted function
// as a callback instead.
expectCaught++;
-
// intercepted should never pass first argument to callback
function fn2(data) {
assert.equal(data, 'data', 'should not be null err argument');
expectCaught++;
-
// Pass an intercepted function to an fs operation that fails.
fs.open('this file does not exist', 'r', d.intercept(function(er) {
console.error('should not get here!', er);
expectCaught++;
-
// implicit addition by being created within a domain-bound context.
var implicit;
process.on('exit', function() {
assert.deepEqual([0, 1, 2, 3, 4, 5], num_args_emited);
});
-
-
stream.resume();
}
});
-
+
process.nextTick(function() {
stream.pause();
setTimeout(function() {
server.listen(common.PORT);
-
server.on('listening', function() {
var req = http.request({
port: common.PORT,
var pending = 0;
-
function server(options, port) {
var s = https.createServer(options, handler);
s.requests = [];
paths = module._nodeModulePaths(file);
assert.ok(paths.indexOf(file + delimiter + 'node_modules') !== -1);
-assert.ok(Array.isArray(paths));
\ No newline at end of file
+assert.ok(Array.isArray(paths));
var c = require('.');
-assert.equal(c.value, 42, 'require(".") should honor NODE_PATH');
\ No newline at end of file
+assert.equal(c.value, 42, 'require(".") should honor NODE_PATH');
var common = require('../common');
var assert = require('assert');
-require(common.fixturesDir + '/require-bin/bin/req.js');
\ No newline at end of file
+require(common.fixturesDir + '/require-bin/bin/req.js');
assert.equal(b[1], 0xff);
-
// verify checking external if has external memory
// check objects
var common = require('../common');
var assert = require('assert');
-// This test verifies that stream.unshift(Buffer(0)) or
+// This test verifies that stream.unshift(Buffer(0)) or
// stream.unshift('') does not set state.reading=false.
var Readable = require('stream').Readable;
process.nextTick(run);
-
test('buffers', function(t) {
// have a length
var len = 16;
assert.equal(c_ucs.toString('binary'), ucs2_control);
-
// now let's test BASE64 and HEX ecoding/decoding
var RADIOS = 2;
var PRE_HALF_APEX = Math.ceil(EXTERN_APEX / 2) - RADIOS;
});
-
// https://github.com/nodejs/io.js/pull/1036
var throws = [
undefined,
}, /test/);
-
console.error('undefined reference');
var error;
script = new Script('foo.bar = 5;');
assert.throws(function() {
script.runInNewContext.call('\'hello\';');
}, TypeError);
-
-
var zlib = require('zlib');
-
// emit random bytes, and keep a shasum
function RandomReadStream(opt) {
Stream.call(this);
};
-
-
var inp = new RandomReadStream({ total: 1024, block: 256, jitter: 16 });
var out = new HashStream();
var gzip = zlib.createGzip();
};
-
// for each of the files, make sure that compressing and
// decompressing results in the same data, for every combination
// of the options set above.
});
-
var sleeperStart = new Date();
exec(SLEEP3_COMMAND, { timeout: 50 }, function(err, stdout, stderr) {
var diff = (new Date()) - sleeperStart;
});
-
-
var startSleep3 = new Date();
var killMeTwice = exec(SLEEP3_COMMAND, {timeout: 1000}, killMeTwiceCallback);
});
-
process.on('exit', function() {
assert.equal(N, chars_recved);
assert.equal(true, npauses > 2);
console.log(testFileName);
-
var kBufSize = 128 * 1024;
var PASS = true;
var neverWrittenBuffer = newBuffer(kBufSize, 0x2e); //0x2e === '.'
var bufPool = [];
-
var tail = require('child_process').spawn('tail', ['-f', testFileName]);
tail.stdout.on('data', tailCB);
}
-
var timeToQuit = Date.now() + 8e3; //Test during no more than this seconds.
(function main() {
throw err;
}
}
-
-
}
-
-
// ******************* UTILITIES
});
-
[1, 2, 3, 4, 5, 6, 7, 8, 9].forEach(function(SPLIT) {
test('unpipe', function(t) {
var r = new TestReader(5);
web.listen(webPort, startClient);
-
var tcp = net.Server(function(s) {
tcp.close();
process.on('exit', function() {
assert.strictEqual(succeeded, 7);
-});
\ No newline at end of file
+});
sock.on('connect', function() {
sock.write('GET / HTTP/1.1\r\n\r\n');
sock.end();
-});
\ No newline at end of file
+});
}
-
function pingping() {
ping();
ping();
}
-
pingping();
-
-
-
process.on('exit', function() {
console.error("process.on('exit')");
console.error(responses);