@@ -35,7 +35,7 @@ function run(command, options, callback) {
35
35
command += ' | ' + ( process . platform === 'win32' ? 'find' : 'grep' ) + ' "std"' ;
36
36
}
37
37
exec ( command , function ( error , stdout ) {
38
- callback ( error ? error . code : 0 , stdout ) ;
38
+ callback ( command , error ? error . code : 0 , stdout ) ;
39
39
} ) ;
40
40
}
41
41
@@ -73,8 +73,7 @@ exports['exit'] = {
73
73
var counts = [ 10 , 100 , 1000 ] ;
74
74
test . expect ( counts . length ) ;
75
75
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 ) {
78
77
var expected = fixture ( n + '-stdout-stderr.txt' ) ;
79
78
test . equal ( true , showDiff ( actual , expected ) , command ) ;
80
79
next ( ) ;
@@ -85,8 +84,7 @@ exports['exit'] = {
85
84
var counts = [ 10 , 100 , 1000 ] ;
86
85
test . expect ( counts . length ) ;
87
86
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 ) {
90
88
var expected = fixture ( n + '-stdout.txt' ) ;
91
89
test . equal ( true , showDiff ( actual , expected ) , command ) ;
92
90
next ( ) ;
@@ -97,8 +95,7 @@ exports['exit'] = {
97
95
var counts = [ 10 , 100 , 1000 ] ;
98
96
test . expect ( counts . length ) ;
99
97
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 ) {
102
99
var expected = fixture ( n + '-stderr.txt' ) ;
103
100
test . equal ( true , showDiff ( actual , expected ) , command ) ;
104
101
next ( ) ;
@@ -109,8 +106,7 @@ exports['exit'] = {
109
106
var codes = [ 0 , 1 , 123 ] ;
110
107
test . expect ( codes . length * 2 ) ;
111
108
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 ) {
114
110
test . equal ( code , n , 'should have exited with ' + n + ' error code.' ) ;
115
111
var expected = fixture ( '10-stdout-stderr.txt' ) ;
116
112
test . equal ( true , showDiff ( actual , expected ) , command ) ;
0 commit comments