57 references to EscapingUtilities
Microsoft.Build.Utilities.Core (15)
Microsoft.Build.Utilities.UnitTests (42)
EscapingUtilities_Tests.cs (42)
18Assert.Equal("", EscapingUtilities.UnescapeAll(""));
19Assert.Equal("foo", EscapingUtilities.UnescapeAll("foo"));
20Assert.Equal("foo space", EscapingUtilities.UnescapeAll("foo%20space"));
21Assert.Equal("foo2;", EscapingUtilities.UnescapeAll("foo2%3B"));
22Assert.Equal(";foo3", EscapingUtilities.UnescapeAll("%3bfoo3"));
23Assert.Equal(";", EscapingUtilities.UnescapeAll("%3b"));
24Assert.Equal(";;;;;", EscapingUtilities.UnescapeAll("%3b%3B;%3b%3B"));
25Assert.Equal("%3B", EscapingUtilities.UnescapeAll("%253B"));
26Assert.Equal("===%ZZ %%%===", EscapingUtilities.UnescapeAll("===%ZZ%20%%%==="));
27Assert.Equal("hello; escaping% how( are) you?", EscapingUtilities.UnescapeAll("hello%3B escaping%25 how%28 are%29 you%3f"));
29Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25*?*%25*"));
30Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25%2a%3f%2a%25%2a"));
32Assert.Equal("*Star*craft or *War*cr@ft??", EscapingUtilities.UnescapeAll("%2aStar%2Acraft%20or %2aWar%2Acr%40ft%3f%3F"));
40Assert.Equal("%2a", EscapingUtilities.Escape("*"));
41Assert.Equal("%3f", EscapingUtilities.Escape("?"));
42Assert.Equal("#%2a%3f%2a#%2a", EscapingUtilities.Escape("#*?*#*"));
43Assert.Equal("%25%2a%3f%2a%25%2a", EscapingUtilities.Escape("%*?*%*"));
52Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text)));
55Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text)));
58Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text)));
67Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text)));
70Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text)));
73Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text)));
79Assert.False(EscapingUtilities.ContainsEscapedWildcards("NoStarOrQMark"));
80Assert.False(EscapingUtilities.ContainsEscapedWildcards("%"));
81Assert.False(EscapingUtilities.ContainsEscapedWildcards("%%"));
82Assert.False(EscapingUtilities.ContainsEscapedWildcards("%2"));
83Assert.False(EscapingUtilities.ContainsEscapedWildcards("%4"));
84Assert.False(EscapingUtilities.ContainsEscapedWildcards("%3A"));
85Assert.False(EscapingUtilities.ContainsEscapedWildcards("%2B"));
86Assert.True(EscapingUtilities.ContainsEscapedWildcards("%2a"));
87Assert.True(EscapingUtilities.ContainsEscapedWildcards("%2A"));
88Assert.True(EscapingUtilities.ContainsEscapedWildcards("%3F"));
89Assert.True(EscapingUtilities.ContainsEscapedWildcards("%3f"));
90Assert.True(EscapingUtilities.ContainsEscapedWildcards("%%3f"));
91Assert.True(EscapingUtilities.ContainsEscapedWildcards("%3%3f"));