2015-05-19 11:00:06 +00:00
|
|
|
'use strict';
|
2016-07-14 15:26:35 +00:00
|
|
|
const common = require('../common');
|
2016-12-30 23:38:06 +00:00
|
|
|
const assert = require('assert');
|
|
|
|
const repl = require('repl');
|
|
|
|
const zlib = require('zlib');
|
2015-05-12 08:00:35 +00:00
|
|
|
|
2019-01-21 00:22:27 +00:00
|
|
|
// Just use builtin stream inherited from Duplex
|
2017-01-08 13:19:00 +00:00
|
|
|
const putIn = zlib.createGzip();
|
|
|
|
const testMe = repl.start('', putIn, function(cmd, context, filename,
|
2017-07-25 17:37:08 +00:00
|
|
|
callback) {
|
2015-05-12 08:00:35 +00:00
|
|
|
callback(null, cmd);
|
|
|
|
});
|
|
|
|
|
2017-02-03 19:54:19 +00:00
|
|
|
testMe._domain.on('error', common.mustNotCall());
|
2015-05-12 08:00:35 +00:00
|
|
|
|
|
|
|
testMe.complete('', function(err, results) {
|
2017-01-08 15:36:25 +00:00
|
|
|
assert.strictEqual(err, null);
|
2015-05-12 08:00:35 +00:00
|
|
|
});
|