@@ -111,7 +111,7 @@ suite('ProcessLogger suite', () => {
111111 const options = { cwd : path . join ( 'debug' , 'path' ) } ;
112112 logger . logProcess ( path . join ( 'net' , untildify ( '~' ) , 'test' ) , [ '--foo' , '--bar' ] , options ) ;
113113
114- sinon . assert . calledWithExactly ( traceLogStub , `> ${ path . join ( '.' , ' net', '~' , 'test' ) } --foo --bar` ) ;
114+ sinon . assert . calledWithExactly ( traceLogStub , `> ${ path . join ( 'net' , '~' , 'test' ) } --foo --bar` ) ;
115115 sinon . assert . calledWithExactly ( traceLogStub , `cwd: ${ options . cwd } ` ) ;
116116 } ) ;
117117
@@ -125,7 +125,7 @@ suite('ProcessLogger suite', () => {
125125
126126 sinon . assert . calledWithExactly (
127127 traceLogStub ,
128- `> ${ path . join ( '.' , ' net', '~' , 'test' ) } --foo ${ path . join ( '~' , 'boo' ) } ` ,
128+ `> ${ path . join ( 'net' , '~' , 'test' ) } --foo ${ path . join ( '~' , 'boo' ) } ` ,
129129 ) ;
130130 sinon . assert . calledWithExactly ( traceLogStub , `cwd: ${ options . cwd } ` ) ;
131131 } ) ;
@@ -134,7 +134,7 @@ suite('ProcessLogger suite', () => {
134134 const options = { cwd : path . join ( 'debug' , 'path' ) } ;
135135 logger . logProcess ( `"${ path . join ( 'net' , untildify ( '~' ) , 'test' ) } " "--foo" "--bar"` , undefined , options ) ;
136136
137- sinon . assert . calledWithExactly ( traceLogStub , `> "${ path . join ( '.' , ' net', '~' , 'test' ) } " "--foo" "--bar"` ) ;
137+ sinon . assert . calledWithExactly ( traceLogStub , `> "${ path . join ( 'net' , '~' , 'test' ) } " "--foo" "--bar"` ) ;
138138 sinon . assert . calledWithExactly ( traceLogStub , `cwd: ${ options . cwd } ` ) ;
139139 } ) ;
140140
@@ -146,39 +146,30 @@ suite('ProcessLogger suite', () => {
146146 sinon . assert . calledWithExactly ( traceLogStub , `cwd: ${ options . cwd } ` ) ;
147147 } ) ;
148148
149- test ( 'Logger only replaces the workspace path with . in the working directory ' , async ( ) => {
149+ test ( 'Logger replaces the path to workspace with . if exactly one workspace folder is opened ' , 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 (
154- traceLogStub ,
155- `> "${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` ,
156- ) ;
153+ sinon . assert . calledWithExactly ( traceLogStub , `> ".${ path . sep } test" "--foo" "--bar"` ) ;
157154 sinon . assert . calledWithExactly ( traceLogStub , `cwd: .${ path . sep + path . join ( 'debug' , 'path' ) } ` ) ;
158155 } ) ;
159156
160- test ( 'On Windows, logger handles both forward and backward slashes in workspace paths for cwd ' , async function ( ) {
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 ( ) {
161158 if ( getOSType ( ) !== OSType . Windows ) {
162159 return this . skip ( ) ;
163160 }
164161 let options = { cwd : path . join ( 'path/to/workspace' , 'debug' , 'path' ) } ;
165162
166163 logger . logProcess ( `"${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` , undefined , options ) ;
167164
168- sinon . assert . calledWithExactly (
169- traceLogStub ,
170- `> "${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` ,
171- ) ;
165+ sinon . assert . calledWithExactly ( traceLogStub , `> ".${ path . sep } test" "--foo" "--bar"` ) ;
172166 sinon . assert . calledWithExactly ( traceLogStub , `cwd: .${ path . sep + path . join ( 'debug' , 'path' ) } ` ) ;
173167 traceLogStub . resetHistory ( ) ;
174168
175169 options = { cwd : path . join ( 'path\\to\\workspace' , 'debug' , 'path' ) } ;
176170 logger . logProcess ( `"${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` , undefined , options ) ;
177171
178- sinon . assert . calledWithExactly (
179- traceLogStub ,
180- `> "${ path . join ( 'path' , 'to' , 'workspace' , 'test' ) } " "--foo" "--bar"` ,
181- ) ;
172+ sinon . assert . calledWithExactly ( traceLogStub , `> ".${ path . sep } test" "--foo" "--bar"` ) ;
182173 sinon . assert . calledWithExactly ( traceLogStub , `cwd: .${ path . sep + path . join ( 'debug' , 'path' ) } ` ) ;
183174 } ) ;
184175
0 commit comments