patch 8.2.0712: various code not fully tested

Problem:    Various code not fully tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #6049)
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index 13770c6..49262f5 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -1371,4 +1371,30 @@
   set timeoutlen&
 endfunc
 
+" Test for translation of special key codes (<xF1>, <xF2>, etc.)
+func Test_Keycode_Tranlsation()
+  let keycodes = [
+        \ ["<xUp>", "<Up>"],
+        \ ["<xDown>", "<Down>"],
+        \ ["<xLeft>", "<Left>"],
+        \ ["<xRight>", "<Right>"],
+        \ ["<xHome>", "<Home>"],
+        \ ["<xEnd>", "<End>"],
+        \ ["<zHome>", "<Home>"],
+        \ ["<zEnd>", "<End>"],
+        \ ["<xF1>", "<F1>"],
+        \ ["<xF2>", "<F2>"],
+        \ ["<xF3>", "<F3>"],
+        \ ["<xF4>", "<F4>"],
+        \ ["<S-xF1>", "<S-F1>"],
+        \ ["<S-xF2>", "<S-F2>"],
+        \ ["<S-xF3>", "<S-F3>"],
+        \ ["<S-xF4>", "<S-F4>"]]
+  for [k1, k2] in keycodes
+    exe "nnoremap " .. k1 .. " 2wx"
+    call assert_true(maparg(k1, 'n', 0, 1).lhs == k2)
+    exe "nunmap " .. k1
+  endfor
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab