view src/testdir/test_ex_equal.vim @ 25957:08f63df32e8e v8.2.3512

patch 8.2.3512: timestamp test fails on some systems Commit: https://github.com/vim/vim/commit/accf4ed352c07ffe59022377c42d36e12dd6d461 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 15 00:38:02 2021 +0100 patch 8.2.3512: timestamp test fails on some systems Problem: Timestamp test fails on some systems. Solution: Sleep for a short while.
author Bram Moolenaar <Bram@vim.org>
date Fri, 15 Oct 2021 01:45:03 +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