view src/testdir/test_behave.vim @ 20386:3b3589275ab9 v8.2.0748

patch 8.2.0748: cannot get a list of all popups Commit: https://github.com/vim/vim/commit/ef6b979bfae82f64781d8b0ce0194c57111243d4 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 13 16:34:15 2020 +0200 patch 8.2.0748: cannot get a list of all popups Problem: Cannot get a list of all popups. Solution: Add popup_list(). Use it in the test runner.
author Bram Moolenaar <Bram@vim.org>
date Wed, 13 May 2020 16:45:05 +0200
parents d4db9adc8642
children 08940efa6b4e
line wrap: on
line source

" Test the :behave command

func Test_behave()
  behave mswin
  call assert_equal('mouse,key', &selectmode)
  call assert_equal('popup', &mousemodel)
  call assert_equal('startsel,stopsel', &keymodel)
  call assert_equal('exclusive', &selection)

  behave xterm
  call assert_equal('', &selectmode)
  call assert_equal('extend', &mousemodel)
  call assert_equal('', &keymodel)
  call assert_equal('inclusive', &selection)

  set selection&
  set mousemodel&
  set keymodel&
  set selection&
endfunc

func Test_behave_completion()
  call feedkeys(":behave \<C-A>\<C-B>\"\<CR>", 'tx')
  call assert_equal('"behave mswin xterm', @:)
endfunc

func Test_behave_error()
  call assert_fails('behave x', 'E475:')
endfunc