From b8904a8c3e8f6d8c00c8d69b153c0d1897b1ade2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 16 Apr 2015 14:19:28 +0900 Subject: Add --tiebreak option for customizing sort criteria Close #191 --- src/item_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/item_test.go') diff --git a/src/item_test.go b/src/item_test.go index 4eea8c15..2d375e47 100644 --- a/src/item_test.go +++ b/src/item_test.go @@ -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 -- cgit v1.2.3