Add additional test case for when extension is prefixed with a dot
This commit is contained in:
parent
723d0e861b
commit
e2b444452d
1 changed files with 18 additions and 0 deletions
|
|
@ -341,6 +341,24 @@ func TestCodeRun(t *testing.T) {
|
|||
},
|
||||
wantBrowse: "https://github.com/search?q=map+path%3Atesting.go&type=code",
|
||||
},
|
||||
{
|
||||
name: "properly handles extension with dot prefix when converting to path qualifier",
|
||||
opts: &CodeOptions{
|
||||
Config: func() (gh.Config, error) { return config.NewBlankConfig(), nil },
|
||||
Query: search.Query{
|
||||
Keywords: []string{"map"},
|
||||
Kind: "code",
|
||||
Limit: 30,
|
||||
Qualifiers: search.Qualifiers{
|
||||
Filename: "testing",
|
||||
Extension: ".cpp",
|
||||
},
|
||||
},
|
||||
Searcher: search.NewSearcher(nil, "github.com"),
|
||||
WebMode: true,
|
||||
},
|
||||
wantBrowse: "https://github.com/search?q=map+path%3Atesting.cpp&type=code",
|
||||
},
|
||||
{
|
||||
name: "does not convert filename and extension qualifiers for GHES web search",
|
||||
opts: &CodeOptions{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue