comparison src/testdir/test_ga.vim @ 19231:b8fd7364befd v8.2.0174

patch 8.2.0174: various commands not completely tested Commit: https://github.com/vim/vim/commit/5d98dc2a48156d44139b75c689bd3137ff7fe8bf Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 29 21:57:34 2020 +0100 patch 8.2.0174: various commands not completely tested Problem: Various commands not completely tested. Solution: Add more test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5551)
author Bram Moolenaar <Bram@vim.org>
date Wed, 29 Jan 2020 22:00:04 +0100
parents 2dcaa860e3fc
children ce55e65d7e41
comparison
equal deleted inserted replaced
19230:21e430519a6c 19231:b8fd7364befd
16 16
17 set display= 17 set display=
18 call assert_equal("\nNUL", Do_ga('')) 18 call assert_equal("\nNUL", Do_ga(''))
19 call assert_equal("\n<^A> 1, Hex 01, Oct 001, Digr SH", Do_ga("\x01")) 19 call assert_equal("\n<^A> 1, Hex 01, Oct 001, Digr SH", Do_ga("\x01"))
20 call assert_equal("\n<^I> 9, Hex 09, Oct 011, Digr HT", Do_ga("\t")) 20 call assert_equal("\n<^I> 9, Hex 09, Oct 011, Digr HT", Do_ga("\t"))
21 call assert_equal("\n<^@> 0, Hex 00, Octal 000", Do_ga("\n"))
21 22
22 call assert_equal("\n<e> 101, Hex 65, Octal 145", Do_ga('e')) 23 call assert_equal("\n<e> 101, Hex 65, Octal 145", Do_ga('e'))
23 24
24 " Test a few multi-bytes characters. 25 " Test a few multi-bytes characters.
25 call assert_equal("\n<é> 233, Hex 00e9, Oct 351, Digr e'", Do_ga('é')) 26 call assert_equal("\n<é> 233, Hex 00e9, Oct 351, Digr e'", Do_ga('é'))
27 28
28 " Test with combining characters. 29 " Test with combining characters.
29 call assert_equal("\n<e> 101, Hex 65, Octal 145 < ́> 769, Hex 0301, Octal 1401", Do_ga("e\u0301")) 30 call assert_equal("\n<e> 101, Hex 65, Octal 145 < ́> 769, Hex 0301, Octal 1401", Do_ga("e\u0301"))
30 call assert_equal("\n<e> 101, Hex 65, Octal 145 < ́> 769, Hex 0301, Octal 1401 < ̱> 817, Hex 0331, Octal 1461", Do_ga("e\u0301\u0331")) 31 call assert_equal("\n<e> 101, Hex 65, Octal 145 < ́> 769, Hex 0301, Octal 1401 < ̱> 817, Hex 0331, Octal 1461", Do_ga("e\u0301\u0331"))
31 call assert_equal("\n<e> 101, Hex 65, Octal 145 < ́> 769, Hex 0301, Octal 1401 < ̱> 817, Hex 0331, Octal 1461 < ̸> 824, Hex 0338, Octal 1470", Do_ga("e\u0301\u0331\u0338")) 32 call assert_equal("\n<e> 101, Hex 65, Octal 145 < ́> 769, Hex 0301, Octal 1401 < ̱> 817, Hex 0331, Octal 1461 < ̸> 824, Hex 0338, Octal 1470", Do_ga("e\u0301\u0331\u0338"))
33
34 " When using Mac fileformat, CR instead of NL is used for line termination
35 enew!
36 set fileformat=mac
37 call assert_equal("\n<^J> 10, Hex 0a, Oct 012, Digr NU", Do_ga("\r"))
38
32 bwipe! 39 bwipe!
33 endfunc 40 endfunc
41
42 " vim: shiftwidth=2 sts=2 expandtab