Add --tiebreak option for customizing sort criteria

Close #191
This commit is contained in:
Junegunn Choi committed 2015-04-16 14:19:28 +09:00
1 parent 48ab87294b
commit b8904a8c3e
7 files changed
+139 -18

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ func TestItemRank(t *testing.T) {
strs := []string{"foo", "foobar", "bar", "baz"}
item1 := Item{text: &strs[0], index: 1, offsets: []Offset{}}
rank1 := item1.Rank(true)
if rank1.matchlen != 0 || rank1.strlen != 3 || rank1.index != 1 {
if rank1.matchlen != 0 || rank1.tiebreak != 3 || rank1.index != 1 {
t.Error(item1.Rank(true))
}
// Only differ in index