Skip to content

Commit

Permalink
Fix the tests error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Dec 25, 2016
1 parent 40c5f22 commit f1e3724
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/rplugin/python3/deoplete/test_filter.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import deoplete.util as util
from deoplete.filter.converter_remove_overlap import overlap_length

def test_fuzzy_escapse():
assert util.fuzzy_escape('foo', 0) == 'f[^f]*o[^o]*o[^o]*'
assert util.fuzzy_escape('foo', 1) == 'f[^f]*o[^o]*o[^o]*'
assert util.fuzzy_escape('Foo', 1) == 'F[^F]*[oO].*[oO].*'

def test_overlap_length():
assert util.overlap_length('foo bar', 'bar baz') == 3
assert util.overlap_length('foobar', 'barbaz') == 3
assert util.overlap_length('foob', 'baz') == 1
assert util.overlap_length('foobar', 'foobar') == 6
assert util.overlap_length('тест', 'ст') == len('ст')
assert overlap_length('foo bar', 'bar baz') == 3
assert overlap_length('foobar', 'barbaz') == 3
assert overlap_length('foob', 'baz') == 1
assert overlap_length('foobar', 'foobar') == 6
assert overlap_length('тест', 'ст') == len('ст')

def test_charwidth():
assert util.charwidth('f') == 1
Expand Down

0 comments on commit f1e3724

Please sign in to comment.