mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 05:20:04 +08:00
21 lines
659 B
VimL
21 lines
659 B
VimL
let s:suite = themis#suite('lexer')
|
|
let s:assert = themis#helper('assert')
|
|
|
|
function! s:suite.token() abort
|
|
let lex = vimproc#lexer#init_lexer('1234 5678')
|
|
call s:assert.true(lex.advance())
|
|
call s:assert.equals(lex.token(), g:vimproc#lexer#token_type.int)
|
|
call s:assert.true(lex.advance())
|
|
call s:assert.equals(lex.token(), g:vimproc#lexer#token_type.int)
|
|
endfunction
|
|
|
|
function! s:suite.value() abort
|
|
let lex = vimproc#lexer#init_lexer('1234 5678')
|
|
call s:assert.true(lex.advance())
|
|
call s:assert.equals(lex.value(), 1234)
|
|
call s:assert.true(lex.advance())
|
|
call s:assert.equals(lex.value(), 5678)
|
|
endfunction
|
|
|
|
" vim:foldmethod=marker:fen:
|