mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
af23d17388
The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'.
33 lines
641 B
VimL
33 lines
641 B
VimL
" Test Ex := command.
|
|
|
|
func Test_ex_equal()
|
|
new
|
|
call setline(1, ["foo\tbar", "bar\tfoo"])
|
|
|
|
let a = execute('=')
|
|
call assert_equal("\n2", a)
|
|
|
|
let a = execute('=#')
|
|
call assert_equal("\n2\n 1 foo bar", a)
|
|
|
|
let a = execute('=l')
|
|
call assert_equal("\n2\nfoo^Ibar$", a)
|
|
|
|
let a = execute('=p')
|
|
call assert_equal("\n2\nfoo bar", a)
|
|
|
|
let a = execute('=l#')
|
|
call assert_equal("\n2\n 1 foo^Ibar$", a)
|
|
|
|
let a = execute('=p#')
|
|
call assert_equal("\n2\n 1 foo bar", a)
|
|
|
|
let a = execute('.=')
|
|
call assert_equal("\n1", a)
|
|
|
|
call assert_fails('3=', 'E16:')
|
|
call assert_fails('=x', 'E488:')
|
|
|
|
bwipe!
|
|
endfunc
|