@@ -91,13 +91,43 @@ func Test_input_farsi()
9191 call feedkeys (" aabc0123456789.+-^%#=xyz\<Esc> " , ' tx' )
9292 call assert_equal (" \x8c 旽蔭左重此虞項斑盛啪\x93 �" , getline (' .' ))
9393
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 (' .' ))
94+ " all non-number special chars with spaces
95+ call feedkeys (" oB E F H I K L M O P Q R T U W Y ` ! @ # $ % ^ & * () - _ = + \\ | : \" . / < > ? \<Esc> " , ' tx' )
96+ call assert_equal (" ��������[ ��������貝�����" , getline (' .' ))
9797
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 (' .' ))
98+ " all non-number special chars without spaces
99+ call feedkeys (" oBEFHIKLMOPQRTUWY`!@#$%^&*()-_=+\\ |:\" ./<>?\<Esc> " ,' tx' )
100+ call assert_equal (" ↑欉褅[]蘼襝蘘╯妙丰狀閮帛朣恨篝誚紋撚" , getline (' .' ))
101+
102+ " all letter chars with spaces
103+ call feedkeys (" oa 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' )
104+ call assert_equal (" ��������������������������������������" , getline (' .' ))
105+
106+ " all letter chars without spaces
107+ call feedkeys (" oaAbcCdDefgGhijJklmnNopqrsStuvVwxXyzZ;\, []\<Esc> " , ' tx' )
108+ call assert_equal (" \x8c 癵恘\x9f 螰x86\x83 媱縷x9d\x85\x80\x9c\x9b\x84 佫\x8a\x89\x8e\x96\x8b 餤x95\x90 迋\x8d 娵\x93 淏\x97 綅x87\x88 " , getline (' .' ))
101109
102110 bwipe!
103111endfunc
112+
113+ func Test_command_line_farsi ()
114+ set allowrevins altkeymap
115+
116+ " letter characters with spaces
117+ call feedkeys (" :\" \<C-_> a 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 ; \\ , [ ]\<CR> " , ' tx' )
118+ call assert_equal (" \" \x88 " , getreg (' :' ))
119+
120+ " letter characters without spaces
121+ call feedkeys (" :\" \<C-_> aAbcCdDefgGhijJklmnNopqrsStuvVwxXyzZ;\\ ,[]\<CR> " , ' tx' )
122+ call assert_equal (" \" \x88\x87 蜎祰惝x93娵\x8d 迋\x90\x95 餤x8b\x96\x8e\x89\x8a 佫\x84\x9b\x9c\x80\x85\x9d 霞鄃x83\x86 螰x9f玴泂\x8c " , getreg (' :' ))
123+
124+ " other characters with spaces
125+ call feedkeys (" :\" \<C-_> 0 1 2 3 4 5 6 7 8 9 ` . ! \" $ % ^ & / () = \\ ? + - _ * : # ~ @ < > { } | B E F H I K L M O P Q R T U W Y\<CR> " , ' tx' )
126+ call assert_equal (" \" ������]����岳��" , getreg (' :' ))
127+
128+ " other characters without spaces
129+ call feedkeys (" :\" \<C-_> 0123456789`.!\" $%^&/()=\\ ?+-_*:#~@<>{}|BEFHIKLMOPQRTUWY\<CR> " , ' tx' )
130+ call assert_equal (" \" 嚬貗齀][釐翫盪禲瞕{撫坍捏鴇重辨蔗辛洩奶誨弛兢毓絕陴掠" , getreg (' :' ))
131+
132+ set noallowrevins noaltkeymap
133+ endfunc
0 commit comments