@@ -75,19 +75,6 @@ describe('debug (slow)', () => {
75
75
) ,
76
76
] ,
77
77
} ;
78
- if ( os . platform ( ) === 'win32' ) {
79
- // The CLI builds the paths in a strange way and mixes the \\ separators with /
80
- // Expected: "c:\\Users\\kittaakos\\dev\\vscode-arduino-tools\\.tests\\data\\packages\\arduino\\tools\\openocd\\0.10.0-arduino7\\bin\\openocd"
81
- // Got: "C:\\Users\\kittaakos\\dev\\vscode-arduino-tools\\.tests\\data\\packages\\arduino\\tools\\openocd\\0.10.0-arduino7/bin/openocd"
82
- // This logic adjusts the expectations on Windows
83
- actual . serverpath = normalizePath ( actual . serverpath ) ;
84
- actual . svdFile = normalizePath ( actual . svdFile ) ;
85
- if ( actual . configFiles ) {
86
- actual . configFiles [ 1 ] = < string > normalizePath ( actual . configFiles [ 1 ] ) ;
87
- }
88
- actual . armToolchainPath = normalizePath ( actual . armToolchainPath ) ;
89
- actual . executable = < string > normalizePath ( actual . executable , false ) ; //
90
- }
91
78
assert . deepStrictEqual ( actual , expected ) ;
92
79
} ) ;
93
80
} ) ;
@@ -163,20 +150,4 @@ describe('debug (slow)', () => {
163
150
function fromBuildPath ( ...paths : string [ ] ) : string {
164
151
return path . join ( buildPath , ...paths ) ;
165
152
}
166
-
167
- function normalizePath (
168
- p : string | undefined ,
169
- driveLetterToLowerCase = true // This is a hack. Sometimes the CLI gives paths with capital case drive, sometimes it's lower-case.
170
- ) : string | undefined {
171
- if ( ! p || os . platform ( ) !== 'win32' ) {
172
- return p ;
173
- }
174
- let normalized = p . split ( '/' ) . join ( '\\' ) ; // cannot use path.resolve as the CLI sometimes gives the trailing separator on Windows, sometimes it does not
175
- if ( driveLetterToLowerCase && / ^ [ a - z ] : \\ / i. test ( normalized ) ) {
176
- normalized =
177
- normalized . substring ( 0 , 1 ) . toLowerCase ( ) +
178
- normalized . substring ( 1 , normalized . length ) ;
179
- }
180
- return normalized ;
181
- }
182
153
} ) ;
0 commit comments