Mercurial > vim
comparison src/testdir/test_farsi.vim @ 10745:265268ea1adc v8.0.0262
patch 8.0.0262: Farsi support is barely tested
commit https://github.com/vim/vim/commit/ddf662a1c86ef0b4bd0c55c5f0aa192ebd6d9a5e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 29 17:59:12 2017 +0100
patch 8.0.0262: Farsi support is barely tested
Problem: Farsi support is barely tested.
Solution: Add more tests for Farsi. Clean up the code.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 29 Jan 2017 18:00:05 +0100 |
parents | 43b8570abbec |
children | b8a79277269a |
comparison
equal
deleted
inserted
replaced
10744:f49773e0c392 | 10745:265268ea1adc |
---|---|
1 " Simplistic testing of Farsi mode. | 1 " Simplistic testing of Farsi mode. |
2 " Note: must be edited with latin1 encoding. | |
2 | 3 |
3 if !has('farsi') | 4 if !has('farsi') |
4 finish | 5 finish |
5 endif | 6 endif |
6 " Farsi uses a single byte encoding. | 7 " Farsi uses a single byte encoding. |
80 set norl | 81 set norl |
81 iunmap xyz | 82 iunmap xyz |
82 set noaltkeymap | 83 set noaltkeymap |
83 bwipe! | 84 bwipe! |
84 endfunc | 85 endfunc |
86 | |
87 func Test_input_farsi() | |
88 new | |
89 setlocal rightleft fkmap | |
90 " numbers switch input direction | |
91 call feedkeys("aabc0123456789.+-^%#=xyz\<Esc>", 'tx') | |
92 call assert_equal("\x8cÌν®¥ª«¦¹¸·¶µ´³²±°Ô\x93Õ", getline('.')) | |
93 | |
94 " all non-number special chars | |
95 call feedkeys("aB E F H I K L M O P Q R T U W Y ` ! @ # $ % ^ & * () - _ = + \\ | : \" . / < > ? \<Esc>", 'tx') | |
96 call assert_equal("\x8cÌν®¥ª«¦¹¸·¶µ´³²±°Ô\x93Õ¡ ô ú À ö æ ç  [ ] ÷ ó ò ð õ ñ ¢ £ § ® ¤ ¥ ª ¬ è ¨© é ½ « ë ê º » ¦ ¯ ¾ ¼ ¿ ", getline('.')) | |
97 | |
98 " all letter chars | |
99 call feedkeys("aa A b c C d D e f g G h i j J k l m n N o p q r s S t u v V w x X y z Z ; \ , [ ] \<Esc>", 'tx') | |
100 call assert_equal("\x8cÌν®¥ª«¦¹¸·¶µ´³²±°Ô\x93Õ¡ ô ú À ö æ ç  [ ] ÷ ó ò ð õ ñ ¢ £ § ® ¤ ¥ ª ¬ è ¨© é ½ « ë ê º » ¦ ¯ ¾ ¼ ¿ Ñ ù Ì Î Ï á þ Æ Ã Ü ø Á à Å ü Þ Ý Ä Ë Ë Ê É Ó Ù Ð û Ø Ö Í Í Ò Ô Ô × Õ ý Ú ß Ç È ", getline('.')) | |
101 | |
102 bwipe! | |
103 endfunc |