neovim/test/old/testdir/test_ex_equal.vim
dundargoc af23d17388
test: move oldtests to test directory (#22536)
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'.
2023-03-07 11:13:04 +08:00

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