37 lines
870 B
Plaintext
37 lines
870 B
Plaintext
|
Execute(Prefix filtering should work for Lists of strings):
|
||
|
AssertEqual
|
||
|
\ ['FooBar', 'foo'],
|
||
|
\ ale#completion#Filter(['FooBar', 'FongBar', 'baz', 'foo'], 'foo')
|
||
|
AssertEqual
|
||
|
\ ['FooBar', 'FongBar', 'baz', 'foo'],
|
||
|
\ ale#completion#Filter(['FooBar', 'FongBar', 'baz', 'foo'], '.')
|
||
|
|
||
|
Execute(Prefix filtering should work for completion items):
|
||
|
AssertEqual
|
||
|
\ [{'word': 'FooBar'}, {'word': 'foo'}],
|
||
|
\ ale#completion#Filter(
|
||
|
\ [
|
||
|
\ {'word': 'FooBar'},
|
||
|
\ {'word': 'FongBar'},
|
||
|
\ {'word': 'baz'},
|
||
|
\ {'word': 'foo'},
|
||
|
\ ],
|
||
|
\ 'foo'
|
||
|
\ )
|
||
|
AssertEqual
|
||
|
\ [
|
||
|
\ {'word': 'FooBar'},
|
||
|
\ {'word': 'FongBar'},
|
||
|
\ {'word': 'baz'},
|
||
|
\ {'word': 'foo'},
|
||
|
\ ],
|
||
|
\ ale#completion#Filter(
|
||
|
\ [
|
||
|
\ {'word': 'FooBar'},
|
||
|
\ {'word': 'FongBar'},
|
||
|
\ {'word': 'baz'},
|
||
|
\ {'word': 'foo'},
|
||
|
\ ],
|
||
|
\ '.'
|
||
|
\ )
|