mirror of
https://github.com/nodejs/node.git
synced 2024-11-25 08:19:38 +01:00
3e1b1dd4a9
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
29 lines
513 B
JavaScript
29 lines
513 B
JavaScript
var common = require('../common');
|
|
var stream = require('stream');
|
|
var assert = require('assert');
|
|
var util = require('util');
|
|
|
|
function Writable() {
|
|
this.writable = true;
|
|
stream.Stream.call(this);
|
|
}
|
|
util.inherits(Writable, stream.Stream);
|
|
|
|
function Readable() {
|
|
this.readable = true;
|
|
stream.Stream.call(this);
|
|
}
|
|
util.inherits(Readable, stream.Stream);
|
|
|
|
var passed = false;
|
|
|
|
var w = new Writable();
|
|
w.on('pipe', function(src) {
|
|
passed = true;
|
|
});
|
|
|
|
var r = new Readable();
|
|
r.pipe(w);
|
|
|
|
assert.ok(passed);
|