view src/testdir/test_ex_equal.vim @ 27833:32366687a0dc v8.2.4442

patch 8.2.4442: test for error reading input fails on MS-Windows Commit: https://github.com/vim/vim/commit/70b9e4f4c3a62e325fd16ac108bd12feb026ede5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 22 15:24:51 2022 +0000 patch 8.2.4442: test for error reading input fails on MS-Windows Problem: Test for error reading input fails on MS-Windows. Solution: Don't run the test on MS-Windows.
author Bram Moolenaar <Bram@vim.org>
date Tue, 22 Feb 2022 16:30:02 +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