Skip to content

Commit d1591e0

Browse files
committed
Actually output the full command line in tests.
1 parent 363dfcc commit d1591e0

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

test/exit_test.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function run(command, options, callback) {
3535
command += ' | ' + (process.platform === 'win32' ? 'find' : 'grep') + ' "std"';
3636
}
3737
exec(command, function(error, stdout) {
38-
callback(error ? error.code : 0, stdout);
38+
callback(command, error ? error.code : 0, stdout);
3939
});
4040
}
4141

@@ -73,8 +73,7 @@ exports['exit'] = {
7373
var counts = [10, 100, 1000];
7474
test.expect(counts.length);
7575
async.eachSeries(counts, function(n, next) {
76-
var command = 'node log.js 0 ' + n + ' stdout stderr';
77-
run(command, {pipe: true}, function(code, actual) {
76+
run('node log.js 0 ' + n + ' stdout stderr', {pipe: true}, function(command, code, actual) {
7877
var expected = fixture(n + '-stdout-stderr.txt');
7978
test.equal(true, showDiff(actual, expected), command);
8079
next();
@@ -85,8 +84,7 @@ exports['exit'] = {
8584
var counts = [10, 100, 1000];
8685
test.expect(counts.length);
8786
async.eachSeries(counts, function(n, next) {
88-
var command = 'node log.js 0 ' + n + ' stdout';
89-
run(command, {pipe: true}, function(code, actual) {
87+
run('node log.js 0 ' + n + ' stdout', {pipe: true}, function(command, code, actual) {
9088
var expected = fixture(n + '-stdout.txt');
9189
test.equal(true, showDiff(actual, expected), command);
9290
next();
@@ -97,8 +95,7 @@ exports['exit'] = {
9795
var counts = [10, 100, 1000];
9896
test.expect(counts.length);
9997
async.eachSeries(counts, function(n, next) {
100-
var command = 'node log.js 0 ' + n + ' stderr';
101-
run(command, {pipe: true}, function(code, actual) {
98+
run('node log.js 0 ' + n + ' stderr', {pipe: true}, function(command, code, actual) {
10299
var expected = fixture(n + '-stderr.txt');
103100
test.equal(true, showDiff(actual, expected), command);
104101
next();
@@ -109,8 +106,7 @@ exports['exit'] = {
109106
var codes = [0, 1, 123];
110107
test.expect(codes.length * 2);
111108
async.eachSeries(codes, function(n, next) {
112-
var command = 'node log.js ' + n + ' 10 stdout stderr';
113-
run(command, {pipe: false}, function(code, actual) {
109+
run('node log.js ' + n + ' 10 stdout stderr', {pipe: false}, function(command, code, actual) {
114110
test.equal(code, n, 'should have exited with ' + n + ' error code.');
115111
var expected = fixture('10-stdout-stderr.txt');
116112
test.equal(true, showDiff(actual, expected), command);

0 commit comments

Comments
 (0)