|
|
|
@ -135,7 +135,7 @@ func TestAll(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
func TestAddRepo_Sort(t *testing.T) {
|
|
|
|
|
i := loadTestIndex(t, true)
|
|
|
|
|
sr, err := i.Search("testing/santa-maria", 100, false)
|
|
|
|
|
sr, err := i.Search("TESTING/SANTA-MARIA", 100, false)
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Fatal(err)
|
|
|
|
|
}
|
|
|
|
@ -202,6 +202,14 @@ func TestSearchByName(t *testing.T) {
|
|
|
|
|
{Name: "ztesting/pinta"},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "description upper search, two results",
|
|
|
|
|
query: "TWO",
|
|
|
|
|
expect: []*Result{
|
|
|
|
|
{Name: "testing/pinta"},
|
|
|
|
|
{Name: "ztesting/pinta"},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "nothing found",
|
|
|
|
|
query: "mayflower",
|
|
|
|
@ -209,7 +217,7 @@ func TestSearchByName(t *testing.T) {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "regexp, one result",
|
|
|
|
|
query: "th[ref]*",
|
|
|
|
|
query: "Th[ref]*",
|
|
|
|
|
expect: []*Result{
|
|
|
|
|
{Name: "testing/santa-maria"},
|
|
|
|
|
},
|
|
|
|
|