2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2011-02-23 04:03:49 +01:00
|
|
|
// Can't test this when 'make test' doesn't assign a tty to the stdout.
|
|
|
|
var common = require('../common');
|
|
|
|
var assert = require('assert');
|
|
|
|
|
2011-11-10 23:51:16 +01:00
|
|
|
var exceptionCaught = false;
|
2011-02-23 04:03:49 +01:00
|
|
|
|
2011-11-10 23:51:16 +01:00
|
|
|
try {
|
|
|
|
process.stdout.end();
|
2012-01-17 19:43:34 +01:00
|
|
|
} catch (e) {
|
2011-11-10 23:51:16 +01:00
|
|
|
exceptionCaught = true;
|
|
|
|
assert.ok(common.isError(e));
|
2012-01-27 22:42:08 +01:00
|
|
|
assert.equal('process.stdout cannot be closed.', e.message);
|
2011-11-10 23:51:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
assert.ok(exceptionCaught);
|