view src/testdir/test_ex_equal.vim @ 30043:fd855ad74887 v9.0.0359

patch 9.0.0359: error message for wrong argument type is not specific Commit: https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Fri Sep 2 15:15:27 2022 +0100 patch 9.0.0359: error message for wrong argument type is not specific Problem: Error message for wrong argument type is not specific. Solution: Include more information in the error. (Yegappan Lakshmanan, closes #11037)
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Sep 2022 16:30:07 +0200
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