digraphs_spec.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. local n = require('test.functional.testnvim')()
  2. local Screen = require('test.functional.ui.screen')
  3. local clear = n.clear
  4. local command = n.command
  5. local feed = n.feed
  6. describe(':digraphs', function()
  7. local screen
  8. before_each(function()
  9. clear()
  10. screen = Screen.new(65, 8)
  11. screen:set_default_attr_ids({
  12. [1] = { bold = true, foreground = Screen.colors.Blue1 },
  13. [2] = { foreground = Screen.colors.Grey100, background = Screen.colors.Red },
  14. [3] = { bold = true, foreground = Screen.colors.SeaGreen4 },
  15. [4] = { bold = true },
  16. [5] = { background = Screen.colors.LightGrey },
  17. [6] = { foreground = Screen.colors.Blue1 },
  18. [7] = { bold = true, reverse = true },
  19. })
  20. end)
  21. it('displays digraphs', function()
  22. command('set more')
  23. feed(':digraphs<CR>')
  24. screen:expect([[
  25. :digraphs |
  26. NU {6:^@} 10 SH {6:^A} 1 SX {6:^B} 2 EX {6:^C} 3 ET {6:^D} 4 |
  27. EQ {6:^E} 5 AK {6:^F} 6 BL {6:^G} 7 BS {6:^H} 8 HT {6:^I} 9 |
  28. LF {6:^@} 10 VT {6:^K} 11 FF {6:^L} 12 CR {6:^M} 13 SO {6:^N} 14 |
  29. SI {6:^O} 15 DL {6:^P} 16 D1 {6:^Q} 17 D2 {6:^R} 18 D3 {6:^S} 19 |
  30. D4 {6:^T} 20 NK {6:^U} 21 SY {6:^V} 22 EB {6:^W} 23 CN {6:^X} 24 |
  31. EM {6:^Y} 25 SB {6:^Z} 26 EC {6:^[} 27 FS {6:^\} 28 GS {6:^]} 29 |
  32. {3:-- More --}^ |
  33. ]])
  34. end)
  35. end)