view src/testdir/test_ex_equal.vim @ 27386:ccfb16d876b1 v8.2.4221

patch 8.2.4221: some functions in normal.c are very long Commit: https://github.com/vim/vim/commit/a827bf3ea8fe465aa456ef7a7a37d6afe6a47628 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Wed Jan 26 12:14:15 2022 +0000 patch 8.2.4221: some functions in normal.c are very long Problem: Some functions in normal.c are very long. Solution: Move code to separate functions. (Yegappan Lakshmanan, closes #9628)
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Jan 2022 13:15:03 +0100
parents 08940efa6b4e
children
line wrap: on
line source

" 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

" vim: shiftwidth=2 sts=2 expandtab