@@ -146,30 +146,39 @@ suite('ProcessLogger suite', () => {
146146 sinon . assert . calledWithExactly ( traceLogStub , `cwd: ${ options . cwd } ` ) ;
147147 } ) ;
148148
149- test ( 'Logger replaces the path to workspace with . if exactly one workspace folder is opened ' , async ( ) => {
149+ test ( 'Logger only replaces the workspace path with . in the working directory ' , async ( ) => {
150150 const options = { cwd : path . join ( 'path' , 'to' , 'workspace' , 'debug' , 'path' ) } ;
151151 logger . logProcess ( `"${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` , undefined , options ) ;
152152
153- sinon . assert . calledWithExactly ( traceLogStub , `> ".${ path . sep } test" "--foo" "--bar"` ) ;
153+ sinon . assert . calledWithExactly (
154+ traceLogStub ,
155+ `> "${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` ,
156+ ) ;
154157 sinon . assert . calledWithExactly ( traceLogStub , `cwd: .${ path . sep + path . join ( 'debug' , 'path' ) } ` ) ;
155158 } ) ;
156159
157- test ( 'On Windows, logger replaces both backwards and forward slash version of path to workspace with . if exactly one workspace folder is opened ' , async function ( ) {
160+ test ( 'On Windows, logger handles both forward and backward slashes in workspace paths for cwd ' , async function ( ) {
158161 if ( getOSType ( ) !== OSType . Windows ) {
159162 return this . skip ( ) ;
160163 }
161164 let options = { cwd : path . join ( 'path/to/workspace' , 'debug' , 'path' ) } ;
162165
163166 logger . logProcess ( `"${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` , undefined , options ) ;
164167
165- sinon . assert . calledWithExactly ( traceLogStub , `> ".${ path . sep } test" "--foo" "--bar"` ) ;
168+ sinon . assert . calledWithExactly (
169+ traceLogStub ,
170+ `> "${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` ,
171+ ) ;
166172 sinon . assert . calledWithExactly ( traceLogStub , `cwd: .${ path . sep + path . join ( 'debug' , 'path' ) } ` ) ;
167173 traceLogStub . resetHistory ( ) ;
168174
169175 options = { cwd : path . join ( 'path\\to\\workspace' , 'debug' , 'path' ) } ;
170176 logger . logProcess ( `"${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` , undefined , options ) ;
171177
172- sinon . assert . calledWithExactly ( traceLogStub , `> ".${ path . sep } test" "--foo" "--bar"` ) ;
178+ sinon . assert . calledWithExactly (
179+ traceLogStub ,
180+ `> "${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` ,
181+ ) ;
173182 sinon . assert . calledWithExactly ( traceLogStub , `cwd: .${ path . sep + path . join ( 'debug' , 'path' ) } ` ) ;
174183 } ) ;
175184
0 commit comments