@@ -12,17 +12,17 @@ public class PathEscapingTests
1212 [ Theory ]
1313 [ InlineData ( "DebugTest.ps1" , "DebugTest.ps1" ) ]
1414 [ InlineData ( "../../DebugTest.ps1" , "../../DebugTest.ps1" ) ]
15- [ InlineData ( "C:\\ Users\\ me\\ Documents\\ DebugTest.ps1" , "C:\\ Users\\ me\\ Documents\ \ DebugTest.ps1" ) ]
15+ [ InlineData ( @ "C:\Users\me\Documents\DebugTest.ps1", @ "C:\Users\me\Documents\DebugTest.ps1") ]
1616 [ InlineData ( "/home/me/Documents/weird&folder/script.ps1" , "/home/me/Documents/weird&folder/script.ps1" ) ]
1717 [ InlineData ( "./path/with some/spaces" , "./path/with some/spaces" ) ]
18- [ InlineData ( "C:\\ path\\ with[some]brackets\\ file.ps1" , "C:\\ path\\ with`[some`]brackets\ \ file.ps1" ) ]
19- [ InlineData ( "C:\\ look\\ an*\\ here.ps1" , "C:\\ look\\ an`*\ \ here.ps1" ) ]
18+ [ InlineData ( @ "C:\path\with[some]brackets\file.ps1", @ "C:\path\with`[some`]brackets\file.ps1") ]
19+ [ InlineData ( @ "C:\look\an*\here.ps1", @ "C:\look\an`*\here.ps1") ]
2020 [ InlineData ( "/Users/me/Documents/?here.ps1" , "/Users/me/Documents/`?here.ps1" ) ]
2121 [ InlineData ( "/Brackets [and s]paces/path.ps1" , "/Brackets `[and s`]paces/path.ps1" ) ]
2222 [ InlineData ( "/CJK.chars/脚本/hello.ps1" , "/CJK.chars/脚本/hello.ps1" ) ]
2323 [ InlineData ( "/CJK.chars/脚本/[hello].ps1" , "/CJK.chars/脚本/`[hello`].ps1" ) ]
24- [ InlineData ( "C:\\ Animals\\ утка\\ quack.ps1" , "C:\\ Animals\\ утка\ \ quack.ps1" ) ]
25- [ InlineData ( "C:\\ &nimals\\ утка\\ qu*ck?.ps1" , "C:\\ &nimals\\ утка\ \ qu`*ck`?.ps1" ) ]
24+ [ InlineData ( @ "C:\Animals\утка\quack.ps1", @ "C:\Animals\утка\quack.ps1") ]
25+ [ InlineData ( @ "C:\&nimals\утка\qu*ck?.ps1", @ "C:\&nimals\утка\qu`*ck`?.ps1") ]
2626 public void CorrectlyWildcardEscapesPathsNoSpaces ( string unescapedPath , string escapedPath )
2727 {
2828 string extensionEscapedPath = PathUtils . WildcardEscapePath ( unescapedPath ) ;
@@ -33,17 +33,17 @@ public void CorrectlyWildcardEscapesPathsNoSpaces(string unescapedPath, string e
3333 [ Theory ]
3434 [ InlineData ( "DebugTest.ps1" , "DebugTest.ps1" ) ]
3535 [ InlineData ( "../../DebugTest.ps1" , "../../DebugTest.ps1" ) ]
36- [ InlineData ( "C:\\ Users\\ me\\ Documents\\ DebugTest.ps1" , "C:\\ Users\\ me\\ Documents\ \ DebugTest.ps1" ) ]
36+ [ InlineData ( @ "C:\Users\me\Documents\DebugTest.ps1", @ "C:\Users\me\Documents\DebugTest.ps1") ]
3737 [ InlineData ( "/home/me/Documents/weird&folder/script.ps1" , "/home/me/Documents/weird&folder/script.ps1" ) ]
3838 [ InlineData ( "./path/with some/spaces" , "./path/with` some/spaces" ) ]
39- [ InlineData ( "C:\\ path\\ with[some]brackets\\ file.ps1" , "C:\\ path\\ with`[some`]brackets\ \ file.ps1" ) ]
40- [ InlineData ( "C:\\ look\\ an*\\ here.ps1" , "C:\\ look\\ an`*\ \ here.ps1" ) ]
39+ [ InlineData ( @ "C:\path\with[some]brackets\file.ps1", @ "C:\path\with`[some`]brackets\file.ps1") ]
40+ [ InlineData ( @ "C:\look\an*\here.ps1", @ "C:\look\an`*\here.ps1") ]
4141 [ InlineData ( "/Users/me/Documents/?here.ps1" , "/Users/me/Documents/`?here.ps1" ) ]
4242 [ InlineData ( "/Brackets [and s]paces/path.ps1" , "/Brackets` `[and` s`]paces/path.ps1" ) ]
4343 [ InlineData ( "/CJK chars/脚本/hello.ps1" , "/CJK` chars/脚本/hello.ps1" ) ]
4444 [ InlineData ( "/CJK chars/脚本/[hello].ps1" , "/CJK` chars/脚本/`[hello`].ps1" ) ]
45- [ InlineData ( "C:\\ Animal s\\ утка\\ quack.ps1" , "C:\\ Animal` s\\ утка\ \ quack.ps1" ) ]
46- [ InlineData ( "C:\\ &nimals\\ утка\\ qu*ck?.ps1" , "C:\\ &nimals\\ утка\ \ qu`*ck`?.ps1" ) ]
45+ [ InlineData ( @ "C:\Animal s\утка\quack.ps1", @ "C:\Animal` s\утка\quack.ps1") ]
46+ [ InlineData ( @ "C:\&nimals\утка\qu*ck?.ps1", @ "C:\&nimals\утка\qu`*ck`?.ps1") ]
4747 public void CorrectlyWildcardEscapesPathsSpaces ( string unescapedPath , string escapedPath )
4848 {
4949 string extensionEscapedPath = PathUtils . WildcardEscapePath ( unescapedPath , escapeSpaces : true ) ;
0 commit comments