view src/testdir/test_ex_equal.vim @ 26956:86f8718c643d v8.2.4007

patch 8.2.4007: session does not restore help buffer properly Commit: https://github.com/vim/vim/commit/8e7d9db32b53ca2b1cb7570d2042860bcd1e943f Author: matveyt <matthewtarasov@gmail.com> Date: Wed Jan 5 14:01:30 2022 +0000 patch 8.2.4007: session does not restore help buffer properly Problem: Session does not restore help buffer properly when "options' is missing from 'sessionoptions'. Solution: Use a ":help" command to create the help window. (closes #9475, closes #9458, closes #9472)
author Bram Moolenaar <Bram@vim.org>
date Wed, 05 Jan 2022 15: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