mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 12:42:32 +00:00
committed by
Ryan Gribble
parent
c25ba887b8
commit
b47b05489e
@@ -71,6 +71,35 @@ public class SearchClientTests
|
||||
Assert.NotEmpty(repos.Items);
|
||||
}
|
||||
|
||||
[IntegrationTest(Skip = "As this repository has been renamed, you cannot search for it's results.")]
|
||||
public async Task SearchForFileNameInCodeWithoutTerm2()
|
||||
{
|
||||
var request = new SearchCodeRequest()
|
||||
{
|
||||
FileName = "project.json",
|
||||
Repos = new RepositoryCollection { "adamcaudill/Psychson" }
|
||||
};
|
||||
|
||||
|
||||
var repos = await _gitHubClient.Search.SearchCode(request);
|
||||
|
||||
Assert.Empty(repos.Items);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task SearchForFileNameInCodeWithoutTermWithUnderscore()
|
||||
{
|
||||
var request = new SearchCodeRequest()
|
||||
{
|
||||
FileName = "readme.md",
|
||||
Repos = new RepositoryCollection { "Cultural-Rogue/_51Wp.XinFengSDK.Demo" }
|
||||
};
|
||||
|
||||
var repos = await _gitHubClient.Search.SearchCode(request);
|
||||
|
||||
Assert.Empty(repos.Items);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task SearchForWordInCode()
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Octokit
|
||||
// the rule:
|
||||
// Username may only contain alphanumeric characters or single hyphens
|
||||
// and cannot begin or end with a hyphen
|
||||
static readonly Regex nameWithOwner = new Regex("[a-z0-9.-]{1,}/[a-z0-9.-]{1,}",
|
||||
static readonly Regex nameWithOwner = new Regex("[a-z0-9.-]{1,}/[a-z0-9.-_]{1,}",
|
||||
#if (!PORTABLE && !NETFX_CORE)
|
||||
RegexOptions.Compiled |
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user