@@ -29,7 +29,7 @@ describe('paths', () => {
2929 it ( 'should convert a windows path to a URI' , ( ) => {
3030 assert . equal (
3131 convertClientPathToDebugger ( 'C:\\Users\\felix\\test.php' ) ,
32- 'file:///C :/Users/felix/test.php'
32+ 'file:///c :/Users/felix/test.php'
3333 )
3434 } )
3535 it ( 'should convert a unix path to a URI' , ( ) => {
@@ -64,15 +64,15 @@ describe('paths', () => {
6464 'C:\\Program Files\\Apache\\2.4\\htdocs' : '/home/felix/mysite' ,
6565 'C:\\Program Files\\MySource' : '/home/felix/mysource' ,
6666 } ) ,
67- 'file:///C :/Program%20Files/Apache/2.4/htdocs/site.php'
67+ 'file:///c :/Program%20Files/Apache/2.4/htdocs/site.php'
6868 )
6969 // source
7070 assert . equal (
7171 convertClientPathToDebugger ( '/home/felix/mysource/source.php' , {
7272 'C:\\Program Files\\Apache\\2.4\\htdocs' : '/home/felix/mysite' ,
7373 'C:\\Program Files\\MySource' : '/home/felix/mysource' ,
7474 } ) ,
75- 'file:///C :/Program%20Files/MySource/source.php'
75+ 'file:///c :/Program%20Files/MySource/source.php'
7676 )
7777 } )
7878 // windows to unix
@@ -94,6 +94,19 @@ describe('paths', () => {
9494 'file:///app/source.php'
9595 )
9696 } )
97+ ; ( process . platform === 'win32' ? it : it . skip ) (
98+ 'should convert a windows path with inconsistent casing to a unix URI' ,
99+ ( ) => {
100+ const localSourceRoot = 'C:\\Users\\felix\\myproject'
101+ const serverSourceRoot = '/var/www'
102+ assert . equal (
103+ convertClientPathToDebugger ( 'c:\\Users\\felix\\myproject\\test.php' , {
104+ [ serverSourceRoot ] : localSourceRoot ,
105+ } ) ,
106+ 'file:///var/www/test.php'
107+ )
108+ }
109+ )
97110 // windows to windows
98111 ; ( process . platform === 'win32' ? it : it . skip ) ( 'should convert a windows path to a windows URI' , ( ) => {
99112 // site
@@ -102,15 +115,15 @@ describe('paths', () => {
102115 'C:\\Program Files\\Apache\\2.4\\htdocs' : 'C:\\Users\\felix\\mysite' ,
103116 'C:\\Program Files\\MySource' : 'C:\\Users\\felix\\mysource' ,
104117 } ) ,
105- 'file:///C :/Program%20Files/Apache/2.4/htdocs/site.php'
118+ 'file:///c :/Program%20Files/Apache/2.4/htdocs/site.php'
106119 )
107120 // source
108121 assert . equal (
109122 convertClientPathToDebugger ( 'C:\\Users\\felix\\mysource\\source.php' , {
110123 'C:\\Program Files\\Apache\\2.4\\htdocs' : 'C:\\Users\\felix\\mysite' ,
111124 'C:\\Program Files\\MySource' : 'C:\\Users\\felix\\mysource' ,
112125 } ) ,
113- 'file:///C :/Program%20Files/MySource/source.php'
126+ 'file:///c :/Program%20Files/MySource/source.php'
114127 )
115128 } )
116129 } )
0 commit comments