node/test/sequential/test-regress-GH-1899.js

20 lines
431 B
JavaScript
Raw Normal View History

var path = require('path');
2012-01-18 02:43:34 +08:00
var assert = require('assert');
var spawn = require('child_process').spawn;
var common = require('../common');
2012-01-18 02:43:34 +08:00
var child = spawn(process.argv[0], [
path.join(common.fixturesDir, 'GH-1899-output.js')
]);
var output = '';
2012-01-18 02:43:34 +08:00
child.stdout.on('data', function(data) {
output += data;
});
2012-01-18 02:43:34 +08:00
child.on('exit', function(code, signal) {
assert.equal(code, 0);
assert.equal(output, 'hello, world!\n');
});