mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 05:30:07 +08:00
15 lines
658 B
VimL
15 lines
658 B
VimL
call vimtest#StartTap()
|
|
call vimtap#Plan(4) " <== XXX Keep plan number updated. XXX
|
|
|
|
let a_phone_number = '1-234-567-0987:1234'
|
|
let not_a_phone_number_1 = ''
|
|
let not_a_phone_number_2 = 'x'
|
|
let not_a_phone_number_3 = '1234'
|
|
|
|
call vimtap#Is(vrs#matches(a_phone_number, 'phone_number'), 1, 'valid telephone matches')
|
|
call vimtap#Is(vrs#matches(not_a_phone_number_1, 'phone_number'), 0, 'invalid telephone 1 does not match')
|
|
call vimtap#Is(vrs#matches(not_a_phone_number_2, 'phone_number'), 0, 'invalid telephone 2 does not match')
|
|
call vimtap#Is(vrs#matches(not_a_phone_number_3, 'phone_number'), 0, 'invalid telephone 3 does not match')
|
|
|
|
call vimtest#Quit()
|