Mercurial > vim
comparison src/testdir/test_functions.vim @ 19400:bd9069d21c5d v8.2.0258
patch 8.2.0258: modifyOtherKeys cannot be temporarily disabled
Commit: https://github.com/vim/vim/commit/4132eb505c506f7a0710b03a275d1c5a247e4196
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 14 16:53:00 2020 +0100
patch 8.2.0258: modifyOtherKeys cannot be temporarily disabled
Problem: ModifyOtherKeys cannot be temporarily disabled.
Solution: Add echoraw() with an example for modifyOtherKeys.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 14 Feb 2020 17:00:04 +0100 |
parents | e4a155edc9cb |
children | 738a4fe2c8c5 |
comparison
equal
deleted
inserted
replaced
19399:99feeb1a4af7 | 19400:bd9069d21c5d |
---|---|
1 " Tests for various functions. | 1 " Tests for various functions. |
2 source shared.vim | 2 source shared.vim |
3 source check.vim | 3 source check.vim |
4 source term_util.vim | 4 source term_util.vim |
5 source screendump.vim | |
5 | 6 |
6 " Must be done first, since the alternate buffer must be unset. | 7 " Must be done first, since the alternate buffer must be unset. |
7 func Test_00_bufexists() | 8 func Test_00_bufexists() |
8 call assert_equal(0, bufexists('does_not_exist')) | 9 call assert_equal(0, bufexists('does_not_exist')) |
9 call assert_equal(1, bufexists(bufnr('%'))) | 10 call assert_equal(1, bufexists(bufnr('%'))) |
2015 call assert_equal(v:t_list, type(range(5))) | 2016 call assert_equal(v:t_list, type(range(5))) |
2016 | 2017 |
2017 " uniq() | 2018 " uniq() |
2018 call assert_equal([0, 1, 2, 3, 4], uniq(range(5))) | 2019 call assert_equal([0, 1, 2, 3, 4], uniq(range(5))) |
2019 endfunc | 2020 endfunc |
2021 | |
2022 func Test_echoraw() | |
2023 CheckScreendump | |
2024 | |
2025 " Normally used for escape codes, but let's test with a CR. | |
2026 let lines =<< trim END | |
2027 call echoraw("hello\<CR>x") | |
2028 END | |
2029 call writefile(lines, 'XTest_echoraw') | |
2030 let buf = RunVimInTerminal('-S XTest_echoraw', {'rows': 5, 'cols': 40}) | |
2031 call VerifyScreenDump(buf, 'Test_functions_echoraw', {}) | |
2032 | |
2033 " clean up | |
2034 call StopVimInTerminal(buf) | |
2035 call delete('XTest_echoraw') | |
2036 endfunc |