@@ -12,17 +12,17 @@ public class PathEscapingTests
12
12
[ Theory ]
13
13
[ InlineData ( "DebugTest.ps1" , "DebugTest.ps1" ) ]
14
14
[ 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") ]
16
16
[ InlineData ( "/home/me/Documents/weird&folder/script.ps1" , "/home/me/Documents/weird&folder/script.ps1" ) ]
17
17
[ 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") ]
20
20
[ InlineData ( "/Users/me/Documents/?here.ps1" , "/Users/me/Documents/`?here.ps1" ) ]
21
21
[ InlineData ( "/Brackets [and s]paces/path.ps1" , "/Brackets `[and s`]paces/path.ps1" ) ]
22
22
[ InlineData ( "/CJK.chars/脚本/hello.ps1" , "/CJK.chars/脚本/hello.ps1" ) ]
23
23
[ 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") ]
26
26
public void CorrectlyWildcardEscapesPathsNoSpaces ( string unescapedPath , string escapedPath )
27
27
{
28
28
string extensionEscapedPath = PathUtils . WildcardEscapePath ( unescapedPath ) ;
@@ -33,17 +33,17 @@ public void CorrectlyWildcardEscapesPathsNoSpaces(string unescapedPath, string e
33
33
[ Theory ]
34
34
[ InlineData ( "DebugTest.ps1" , "DebugTest.ps1" ) ]
35
35
[ 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") ]
37
37
[ InlineData ( "/home/me/Documents/weird&folder/script.ps1" , "/home/me/Documents/weird&folder/script.ps1" ) ]
38
38
[ 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") ]
41
41
[ InlineData ( "/Users/me/Documents/?here.ps1" , "/Users/me/Documents/`?here.ps1" ) ]
42
42
[ InlineData ( "/Brackets [and s]paces/path.ps1" , "/Brackets` `[and` s`]paces/path.ps1" ) ]
43
43
[ InlineData ( "/CJK chars/脚本/hello.ps1" , "/CJK` chars/脚本/hello.ps1" ) ]
44
44
[ 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") ]
47
47
public void CorrectlyWildcardEscapesPathsSpaces ( string unescapedPath , string escapedPath )
48
48
{
49
49
string extensionEscapedPath = PathUtils . WildcardEscapePath ( unescapedPath , escapeSpaces : true ) ;
0 commit comments