mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 19:26:51 +00:00
[bug]: Fixed a bug that content cannot be retrieved if "#" is included in a file or folder name.
This commit is contained in:
@@ -89,5 +89,30 @@ namespace Octokit.Tests.Helpers
|
||||
Assert.Equal("\\\"test milestone\\\"", input.EscapeDoubleQuotes());
|
||||
}
|
||||
}
|
||||
|
||||
public class EncodeSharpMethod
|
||||
{
|
||||
[Fact]
|
||||
public void EncodeSharpReturnsNullForNullInput()
|
||||
{
|
||||
Assert.Equal(string.Empty, (null as string).EncodeSharp());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncodeSharpReturnsInputWithoutDoubleQuotes()
|
||||
{
|
||||
string input = "some test input without double quotes in it";
|
||||
|
||||
Assert.Equal(input, input.EncodeSharp());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EncodeAllSharp()
|
||||
{
|
||||
string input = "#some test input with # in it#";
|
||||
|
||||
Assert.Equal("%23some test input with %23 in it%23", input.EncodeSharp());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user