[remote] fix test

This commit is contained in:
chzyer 2016-04-11 01:54:54 +08:00
parent d4c46a49e6
commit de49e7f118
1 changed files with 5 additions and 0 deletions

View File

@ -154,6 +154,11 @@ func TestSegmentCompleter(t *testing.T) {
{"a a1 a11", 8, sr(""), 3}, {"a a1 a11", 8, sr(""), 3},
{"route add", 9, sr("", "domain"), 3}, {"route add", 9, sr("", "domain"), 3},
} }
for _, r := range ret {
for idx, rr := range r.Ret {
r.Ret[idx] = append(rr, ' ')
}
}
for i, r := range ret { for i, r := range ret {
newLine, length := s.Do([]rune(r.Line), r.Pos) newLine, length := s.Do([]rune(r.Line), r.Pos)
test.Equal(rs(newLine), rs(r.Ret), fmt.Errorf("%v", i)) test.Equal(rs(newLine), rs(r.Ret), fmt.Errorf("%v", i))