view src/testdir/test_behave.vim @ 22734:02b782e80ee4 v8.2.1915

patch 8.2.1915: Vim9: error for wrong number of arguments is not useful Commit: https://github.com/vim/vim/commit/6cf7e3b026727818cd137e2b317b1f6d7c072703 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 28 14:31:16 2020 +0100 patch 8.2.1915: Vim9: error for wrong number of arguments is not useful Problem: Vim9: error for wrong number of arguments is not useful. Solution: Mention whatever we have for the name. (closes https://github.com/vim/vim/issues/7208)
author Bram Moolenaar <Bram@vim.org>
date Wed, 28 Oct 2020 14:45:04 +0100
parents 08940efa6b4e
children
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

" vim: shiftwidth=2 sts=2 expandtab