annotate src/testdir/test_digraph.vim @ 34656:3b29a2cdbf74 v9.1.0212

patch 9.1.0212: CI: MS-Windows fails in test_winfixbuf Commit: https://github.com/vim/vim/commit/79b2867ce3f4ed99d8c4e06c2c3b8f105f67c53a Author: Christian Brabandt <cb@256bit.org> Date: Wed Mar 27 10:44:14 2024 +0100 patch 9.1.0212: CI: MS-Windows fails in test_winfixbuf Problem: CI: MS-Windows fails in test_winfixbuf (after v9.1.208) Solution: Skip Ms-Windows for now, fix style related: #14286 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 27 Mar 2024 11:00:06 +0100
parents 74a0f1bc62b1
children 4e8ba4866760
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Tests for digraphs
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
17089
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
3 source check.vim
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
4 CheckFeature digraphs
20941
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
5 source term_util.vim
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
7 func Put_Dig(chars)
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 exe "norm! o\<c-k>".a:chars
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 endfu
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
11 func Put_Dig_BS(char1, char2)
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 exe "norm! o".a:char1."\<bs>".a:char2
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 endfu
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
15 func Test_digraphs()
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 new
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 call Put_Dig("00")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 call assert_equal("∞", getline('.'))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 " not a digraph
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 call Put_Dig("el")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 call assert_equal("l", getline('.'))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 call Put_Dig("ht")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 call assert_equal("þ", getline('.'))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 " digraph "ab" is the same as "ba"
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 call Put_Dig("ab")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 call Put_Dig("ba")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 call assert_equal(["ば","ば"], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 " Euro sign
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 call Put_Dig("e=")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 call Put_Dig("=e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 call Put_Dig("Eu")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 call Put_Dig("uE")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 call assert_equal(['е']+repeat(["€"],3), getline(line('.')-3,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 " Rouble sign
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 call Put_Dig("R=")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 call Put_Dig("=R")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 call Put_Dig("=P")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 call Put_Dig("P=")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 call assert_equal(['Р']+repeat(["₽"],2)+['П'], getline(line('.')-3,line('.')))
33629
74a0f1bc62b1 patch 9.0.2056: no digraph for quadruple prime
Christian Brabandt <cb@256bit.org>
parents: 30379
diff changeset
40 " Quadruple prime
74a0f1bc62b1 patch 9.0.2056: no digraph for quadruple prime
Christian Brabandt <cb@256bit.org>
parents: 30379
diff changeset
41 call Put_Dig("'4")
74a0f1bc62b1 patch 9.0.2056: no digraph for quadruple prime
Christian Brabandt <cb@256bit.org>
parents: 30379
diff changeset
42 call assert_equal("⁗", getline('.'))
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 " Not a digraph
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 call Put_Dig("a\<bs>")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 call Put_Dig("\<bs>a")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 call assert_equal(["<BS>", "<BS>a"], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 " Grave
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 call Put_Dig("a!")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 call Put_Dig("!e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 call Put_Dig("b!") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 call assert_equal(["à", "è", "!"], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 " Acute accent
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 call Put_Dig("a'")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 call Put_Dig("'e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 call Put_Dig("b'") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 call assert_equal(["á", "é", "'"], getline(line('.')-2,line('.')))
28171
b4c111ea83b1 patch 8.2.4611: typos in tests; one lua line not covered by test
Bram Moolenaar <Bram@vim.org>
parents: 25759
diff changeset
57 " Circumflex
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 call Put_Dig("a>")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 call Put_Dig(">e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 call Put_Dig("b>") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 call assert_equal(['â', 'ê', '>'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 " Tilde
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 call Put_Dig("o~")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 call Put_Dig("~u") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 call Put_Dig("z~") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 call assert_equal(['õ', 'u', '~'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 " Tilde
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 call Put_Dig("o?")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 call Put_Dig("?u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 call Put_Dig("z?") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 call assert_equal(['õ', 'ũ', '?'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 " Macron
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 call Put_Dig("o-")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 call Put_Dig("-u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 call Put_Dig("z-") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 call assert_equal(['ō', 'ū', '-'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 " Breve
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 call Put_Dig("o(")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 call Put_Dig("(u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 call Put_Dig("z(") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 call assert_equal(['ŏ', 'ŭ', '('], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 " Dot above
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 call Put_Dig("b.")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 call Put_Dig(".e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 call Put_Dig("a.") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 call assert_equal(['ḃ', 'ė', '.'], getline(line('.')-2,line('.')))
19195
2ef19eed524a patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
87 " Diaeresis
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 call Put_Dig("a:")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 call Put_Dig(":u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 call Put_Dig("b:") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 call assert_equal(['ä', 'ü', ':'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 " Cedilla
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 call Put_Dig("',")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 call Put_Dig(",C")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 call Put_Dig("b,") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96 call assert_equal(['¸', 'Ç', ','], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 " Underline
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 call Put_Dig("B_")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99 call Put_Dig("_t")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 call Put_Dig("a_") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101 call assert_equal(['Ḇ', 'ṯ', '_'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 " Stroke
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103 call Put_Dig("j/")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104 call Put_Dig("/l")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 call Put_Dig("b/") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 call assert_equal(['/', 'ł', '/'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 " Double acute
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108 call Put_Dig('O"')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109 call Put_Dig('"y')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 call Put_Dig('b"') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 call assert_equal(['Ő', 'ÿ', '"'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 " Ogonek
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113 call Put_Dig('u;')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 call Put_Dig(';E')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
115 call Put_Dig('b;') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 call assert_equal(['ų', 'Ę', ';'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
117 " Caron
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118 call Put_Dig('u<')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119 call Put_Dig('<E')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120 call Put_Dig('b<') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121 call assert_equal(['ǔ', 'Ě', '<'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
122 " Ring above
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
123 call Put_Dig('u0')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
124 call Put_Dig('0E') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
125 call Put_Dig('b0') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
126 call assert_equal(['ů', 'E', '0'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
127 " Hook
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
128 call Put_Dig('u2')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
129 call Put_Dig('2E')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
130 call Put_Dig('b2') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
131 call assert_equal(['ủ', 'Ẻ', '2'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132 " Horn
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133 call Put_Dig('u9')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134 call Put_Dig('9E') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 call Put_Dig('b9') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 call assert_equal(['ư', 'E', '9'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137 " Cyrillic
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
138 call Put_Dig('u=')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139 call Put_Dig('=b')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
140 call Put_Dig('=_')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
141 call assert_equal(['у', 'б', '〓'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
142 " Greek
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
143 call Put_Dig('u*')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
144 call Put_Dig('*b')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
145 call Put_Dig('*_')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
146 call assert_equal(['υ', 'β', '々'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
147 " Greek/Cyrillic special
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
148 call Put_Dig('u%')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
149 call Put_Dig('%b') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
150 call Put_Dig('%_') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
151 call assert_equal(['ύ', 'b', '_'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
152 " Arabic
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
153 call Put_Dig('u+')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
154 call Put_Dig('+b')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
155 call Put_Dig('+_') " japanese industrial symbol
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
156 call assert_equal(['+', 'ب', '〄'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
157 " Hebrew
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
158 call Put_Dig('Q+')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
159 call Put_Dig('+B')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
160 call Put_Dig('+X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
161 call assert_equal(['ק', 'ב', 'ח'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
162 " Latin
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
163 call Put_Dig('a3')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
164 call Put_Dig('A3')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
165 call Put_Dig('3X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
166 call assert_equal(['ǣ', 'Ǣ', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
167 " Bopomofo
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
168 call Put_Dig('a4')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
169 call Put_Dig('A4')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
170 call Put_Dig('4X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
171 call assert_equal(['ㄚ', '4', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
172 " Hiragana
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
173 call Put_Dig('a5')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
174 call Put_Dig('A5')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
175 call Put_Dig('5X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
176 call assert_equal(['あ', 'ぁ', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
177 " Katakana
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
178 call Put_Dig('a6')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
179 call Put_Dig('A6')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
180 call Put_Dig('6X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
181 call assert_equal(['ァ', 'ア', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
182 " Superscripts
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
183 call Put_Dig('1S')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
184 call Put_Dig('2S')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
185 call Put_Dig('3S')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
186 call assert_equal(['¹', '²', '³'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
187 " Subscripts
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
188 call Put_Dig('1s')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
189 call Put_Dig('2s')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
190 call Put_Dig('3s')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
191 call assert_equal(['₁', '₂', '₃'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
192 " Eszet (only lowercase)
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
193 call Put_Dig("ss")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
194 call Put_Dig("SS") " start of string
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
195 call assert_equal(["ß", "˜"], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
196 " High bit set
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
197 call Put_Dig("a ")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
198 call Put_Dig(" A")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
199 call assert_equal(['á', 'Á'], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
200 " Escape is not part of a digraph
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
201 call Put_Dig("a\<esc>")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
202 call Put_Dig("\<esc>A")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
203 call assert_equal(['', 'A'], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
204 " define some custom digraphs
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
205 " old: 00 ∞
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
206 " old: el l
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
207 digraph 00 9216
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
208 digraph el 0252
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
209 call Put_Dig("00")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
210 call Put_Dig("el")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
211 " Reset digraphs
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
212 digraph 00 8734
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
213 digraph el 108
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
214 call Put_Dig("00")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
215 call Put_Dig("el")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
216 call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.')))
19932
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
217 call assert_fails('exe "digraph a\<Esc> 100"', 'E104:')
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
218 call assert_fails('exe "digraph \<Esc>a 100"', 'E104:')
20041
3601e816a569 patch 8.2.0576: some errors are not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20039
diff changeset
219 call assert_fails('digraph xy z', 'E39:')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
220 call assert_fails('digraph x', 'E1214:')
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
221 bw!
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
222 endfunc
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
223
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
224 func Test_digraphs_option()
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
225 " reset whichwrap option, so that testing <esc><bs>A works,
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
226 " without moving up a line
9616
6144d9bfb037 commit https://github.com/vim/vim/commit/dfd63e30d13fff5603416b6c7e247cebeb003eb0
Christian Brabandt <cb@256bit.org>
parents: 9614
diff changeset
227 set digraph ww=
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
228 new
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
229 call Put_Dig_BS("0","0")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
230 call assert_equal("∞", getline('.'))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
231 " not a digraph
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
232 call Put_Dig_BS("e","l")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
233 call assert_equal("l", getline('.'))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
234 call Put_Dig_BS("h","t")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
235 call assert_equal("þ", getline('.'))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
236 " digraph "ab" is the same as "ba"
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
237 call Put_Dig_BS("a","b")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
238 call Put_Dig_BS("b","a")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
239 call assert_equal(["ば","ば"], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
240 " Euro sign
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
241 call Put_Dig_BS("e","=")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
242 call Put_Dig_BS("=","e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
243 call Put_Dig_BS("E","u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
244 call Put_Dig_BS("u","E")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
245 call assert_equal(['е']+repeat(["€"],3), getline(line('.')-3,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
246 " Rouble sign
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
247 call Put_Dig_BS("R","=")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
248 call Put_Dig_BS("=","R")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
249 call Put_Dig_BS("=","P")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
250 call Put_Dig_BS("P","=")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
251 call assert_equal(['Р']+repeat(["₽"],2)+['П'], getline(line('.')-3,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
252 " Not a digraph: this is different from <c-k>!
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
253 call Put_Dig_BS("a","\<bs>")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
254 call Put_Dig_BS("\<bs>","a")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
255 call assert_equal(['','a'], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
256 " Grave
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
257 call Put_Dig_BS("a","!")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
258 call Put_Dig_BS("!","e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
259 call Put_Dig_BS("b","!") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
260 call assert_equal(["à", "è", "!"], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
261 " Acute accent
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
262 call Put_Dig_BS("a","'")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
263 call Put_Dig_BS("'","e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
264 call Put_Dig_BS("b","'") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
265 call assert_equal(["á", "é", "'"], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
266 " Cicumflex
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
267 call Put_Dig_BS("a",">")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
268 call Put_Dig_BS(">","e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
269 call Put_Dig_BS("b",">") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
270 call assert_equal(['â', 'ê', '>'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
271 " Tilde
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
272 call Put_Dig_BS("o","~")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
273 call Put_Dig_BS("~","u") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
274 call Put_Dig_BS("z","~") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
275 call assert_equal(['õ', 'u', '~'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
276 " Tilde
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
277 call Put_Dig_BS("o","?")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
278 call Put_Dig_BS("?","u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
279 call Put_Dig_BS("z","?") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
280 call assert_equal(['õ', 'ũ', '?'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
281 " Macron
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
282 call Put_Dig_BS("o","-")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
283 call Put_Dig_BS("-","u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
284 call Put_Dig_BS("z","-") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
285 call assert_equal(['ō', 'ū', '-'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
286 " Breve
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
287 call Put_Dig_BS("o","(")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
288 call Put_Dig_BS("(","u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
289 call Put_Dig_BS("z","(") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
290 call assert_equal(['ŏ', 'ŭ', '('], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
291 " Dot above
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
292 call Put_Dig_BS("b",".")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
293 call Put_Dig_BS(".","e")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
294 call Put_Dig_BS("a",".") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
295 call assert_equal(['ḃ', 'ė', '.'], getline(line('.')-2,line('.')))
19195
2ef19eed524a patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
296 " Diaeresis
9610
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
297 call Put_Dig_BS("a",":")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
298 call Put_Dig_BS(":","u")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
299 call Put_Dig_BS("b",":") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
300 call assert_equal(['ä', 'ü', ':'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
301 " Cedilla
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
302 call Put_Dig_BS("'",",")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
303 call Put_Dig_BS(",","C")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
304 call Put_Dig_BS("b",",") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
305 call assert_equal(['¸', 'Ç', ','], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
306 " Underline
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
307 call Put_Dig_BS("B","_")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
308 call Put_Dig_BS("_","t")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
309 call Put_Dig_BS("a","_") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
310 call assert_equal(['Ḇ', 'ṯ', '_'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
311 " Stroke
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
312 call Put_Dig_BS("j","/")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
313 call Put_Dig_BS("/","l")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
314 call Put_Dig_BS("b","/") " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
315 call assert_equal(['/', 'ł', '/'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
316 " Double acute
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
317 call Put_Dig_BS('O','"')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
318 call Put_Dig_BS('"','y')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
319 call Put_Dig_BS('b','"') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
320 call assert_equal(['Ő', 'ÿ', '"'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
321 " Ogonek
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
322 call Put_Dig_BS('u',';')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
323 call Put_Dig_BS(';','E')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
324 call Put_Dig_BS('b',';') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
325 call assert_equal(['ų', 'Ę', ';'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
326 " Caron
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
327 call Put_Dig_BS('u','<')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
328 call Put_Dig_BS('<','E')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
329 call Put_Dig_BS('b','<') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
330 call assert_equal(['ǔ', 'Ě', '<'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
331 " Ring above
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
332 call Put_Dig_BS('u','0')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
333 call Put_Dig_BS('0','E') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
334 call Put_Dig_BS('b','0') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
335 call assert_equal(['ů', 'E', '0'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
336 " Hook
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
337 call Put_Dig_BS('u','2')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
338 call Put_Dig_BS('2','E')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
339 call Put_Dig_BS('b','2') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
340 call assert_equal(['ủ', 'Ẻ', '2'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
341 " Horn
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
342 call Put_Dig_BS('u','9')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
343 call Put_Dig_BS('9','E') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
344 call Put_Dig_BS('b','9') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
345 call assert_equal(['ư', 'E', '9'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
346 " Cyrillic
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
347 call Put_Dig_BS('u','=')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
348 call Put_Dig_BS('=','b')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
349 call Put_Dig_BS('=','_')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
350 call assert_equal(['у', 'б', '〓'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
351 " Greek
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
352 call Put_Dig_BS('u','*')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
353 call Put_Dig_BS('*','b')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
354 call Put_Dig_BS('*','_')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
355 call assert_equal(['υ', 'β', '々'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
356 " Greek/Cyrillic special
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
357 call Put_Dig_BS('u','%')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
358 call Put_Dig_BS('%','b') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
359 call Put_Dig_BS('%','_') " not defined
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
360 call assert_equal(['ύ', 'b', '_'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
361 " Arabic
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
362 call Put_Dig_BS('u','+')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
363 call Put_Dig_BS('+','b')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
364 call Put_Dig_BS('+','_') " japanese industrial symbol
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
365 call assert_equal(['+', 'ب', '〄'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
366 " Hebrew
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
367 call Put_Dig_BS('Q','+')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
368 call Put_Dig_BS('+','B')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
369 call Put_Dig_BS('+','X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
370 call assert_equal(['ק', 'ב', 'ח'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
371 " Latin
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
372 call Put_Dig_BS('a','3')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
373 call Put_Dig_BS('A','3')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
374 call Put_Dig_BS('3','X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
375 call assert_equal(['ǣ', 'Ǣ', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
376 " Bopomofo
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
377 call Put_Dig_BS('a','4')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
378 call Put_Dig_BS('A','4')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
379 call Put_Dig_BS('4','X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
380 call assert_equal(['ㄚ', '4', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
381 " Hiragana
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
382 call Put_Dig_BS('a','5')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
383 call Put_Dig_BS('A','5')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
384 call Put_Dig_BS('5','X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
385 call assert_equal(['あ', 'ぁ', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
386 " Katakana
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
387 call Put_Dig_BS('a','6')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
388 call Put_Dig_BS('A','6')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
389 call Put_Dig_BS('6','X')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
390 call assert_equal(['ァ', 'ア', 'X'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
391 " Superscripts
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
392 call Put_Dig_BS('1','S')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
393 call Put_Dig_BS('2','S')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
394 call Put_Dig_BS('3','S')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
395 call assert_equal(['¹', '²', '³'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
396 " Subscripts
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
397 call Put_Dig_BS('1','s')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
398 call Put_Dig_BS('2','s')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
399 call Put_Dig_BS('3','s')
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
400 call assert_equal(['₁', '₂', '₃'], getline(line('.')-2,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
401 " Eszet (only lowercase)
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
402 call Put_Dig_BS("s","s")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
403 call Put_Dig_BS("S","S") " start of string
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
404 call assert_equal(["ß", "˜"], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
405 " High bit set (different from <c-k>)
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
406 call Put_Dig_BS("a"," ")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
407 call Put_Dig_BS(" ","A")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
408 call assert_equal([' ', 'A'], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
409 " Escape is not part of a digraph (different from <c-k>)
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
410 call Put_Dig_BS("a","\<esc>")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
411 call Put_Dig_BS("\<esc>","A")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
412 call assert_equal(['', ''], getline(line('.')-1,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
413 " define some custom digraphs
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
414 " old: 00 ∞
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
415 " old: el l
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
416 digraph 00 9216
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
417 digraph el 0252
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
418 call Put_Dig_BS("0","0")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
419 call Put_Dig_BS("e","l")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
420 " Reset digraphs
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
421 digraph 00 8734
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
422 digraph el 108
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
423 call Put_Dig_BS("0","0")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
424 call Put_Dig_BS("e","l")
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
425 call assert_equal(['␀', 'ü', '∞', 'l'], getline(line('.')-3,line('.')))
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
426 set nodigraph ww&vim
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
427 bw!
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
428 endfunc
8f1de7b71199 commit https://github.com/vim/vim/commit/397eadbe25370394e0dc3cb18766533a15b8d1c0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
429
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
430 func Test_digraphs_output()
9620
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
431 new
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
432 let out = execute(':digraph')
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
433 call assert_equal('Eu € 8364', matchstr(out, '\C\<Eu\D*8364\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
434 call assert_equal('=e € 8364', matchstr(out, '\C=e\D*8364\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
435 call assert_equal('=R ₽ 8381', matchstr(out, '\C=R\D*8381\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
436 call assert_equal('=P ₽ 8381', matchstr(out, '\C=P\D*8381\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
437 call assert_equal('o: ö 246', matchstr(out, '\C\<o:\D*246\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
438 call assert_equal('v4 ㄪ 12586', matchstr(out, '\C\<v4\D*12586\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
439 call assert_equal("'0 ˚ 730", matchstr(out, '\C''0\D*730\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
440 call assert_equal('Z% Ж 1046', matchstr(out, '\C\<Z%\D*1046\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
441 call assert_equal('u- ū 363', matchstr(out, '\C\<u-\D*363\>'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
442 call assert_equal('SH ^A 1', matchstr(out, '\C\<SH\D*1\>'))
20039
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
443 call assert_notmatch('Latin supplement', out)
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
444
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
445 let out_bang_without_custom = execute(':digraph!')
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
446 digraph lt 60
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
447 let out_bang_with_custom = execute(':digraph!')
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
448 call assert_notmatch('lt', out_bang_without_custom)
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
449 call assert_match("^\n"
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
450 \ .. "NU ^@ 10 .*\n"
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
451 \ .. "Latin supplement\n"
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
452 \ .. "!I ¡ 161 .*\n"
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
453 \ .. ".*\n"
41d0b22db011 patch 8.2.0575: :digraph! not tested
Bram Moolenaar <Bram@vim.org>
parents: 19932
diff changeset
454 \ .. 'Custom\n.*\<lt < 60\>', out_bang_with_custom)
9620
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
455 bw!
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
456 endfunc
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
457
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
458 func Test_loadkeymap()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20947
diff changeset
459 CheckFeature keymap
9620
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
460 new
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
461 set keymap=czech
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
462 set iminsert=0
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
463 call feedkeys("o|\<c-^>|01234567890|\<esc>", 'tx')
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
464 call assert_equal("|'é+ěščřžýáíé'", getline('.'))
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
465 " reset keymap and encoding option
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
466 set keymap=
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
467 bw!
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
468 endfunc
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
469
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
470 func Test_digraph_cmndline()
9620
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
471 " Create digraph on commandline
19581
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
472 call feedkeys(":\"\<c-k>Eu\<cr>", 'xt')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
473 call assert_equal('"€', @:)
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
474
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
475 " Canceling a CTRL-K on the cmdline
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
476 call feedkeys(":\"a\<c-k>\<esc>b\<cr>", 'xt')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
477 call assert_equal('"ab', @:)
9620
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
478 endfunc
3539c9e51785 commit https://github.com/vim/vim/commit/e25bc5abb4621c6263b0248988a207d53b57fc54
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
479
13359
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
480 func Test_show_digraph()
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
481 new
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
482 call Put_Dig("e=")
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
483 call assert_equal("\n<е> 1077, Hex 0435, Oct 2065, Digr e=", execute('ascii'))
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
484 bwipe!
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
485 endfunc
81c348d40312 patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents: 12644
diff changeset
486
14083
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
487 func Test_show_digraph_cp1251()
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
488 new
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
489 set encoding=cp1251
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
490 call Put_Dig("='")
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
491 call assert_equal("\n<\xfa> <|z> <M-z> 250, Hex fa, Oct 372, Digr ='", execute('ascii'))
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
492 set encoding=utf-8
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
493 bwipe!
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
494 endfunc
8a9a00357676 patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents: 13359
diff changeset
495
19932
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
496 " Test for error in a keymap file
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
497 func Test_loadkeymap_error()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20947
diff changeset
498 CheckFeature keymap
19932
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
499 call assert_fails('loadkeymap', 'E105:')
30379
25e3121ed316 patch 9.0.0525: manually deleting temp test files
Bram Moolenaar <Bram@vim.org>
parents: 28171
diff changeset
500 call writefile(['loadkeymap', 'a'], 'Xkeymap', 'D')
19932
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
501 call assert_fails('source Xkeymap', 'E791:')
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
502 endfunc
2c4d9ca33769 patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents: 19581
diff changeset
503
20947
1c71605f0c5d patch 8.2.1025: tabpage menu and tabline not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 20941
diff changeset
504 " Test for the characters displayed on the screen when entering a digraph
20941
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
505 func Test_entering_digraph()
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
506 CheckRunVimInTerminal
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
507 let buf = RunVimInTerminal('', {'rows': 6})
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
508 call term_sendkeys(buf, "i\<C-K>")
21897
e0af4660dfc7 patch 8.2.1498: on slow systems tests can be flaky
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
509 call TermWait(buf)
20941
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
510 call assert_equal('?', term_getline(buf, 1))
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
511 call term_sendkeys(buf, "1")
21897
e0af4660dfc7 patch 8.2.1498: on slow systems tests can be flaky
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
512 call TermWait(buf)
20941
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
513 call assert_equal('1', term_getline(buf, 1))
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
514 call term_sendkeys(buf, "2")
21897
e0af4660dfc7 patch 8.2.1498: on slow systems tests can be flaky
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
515 call TermWait(buf)
20941
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
516 call assert_equal('½', term_getline(buf, 1))
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
517 call StopVimInTerminal(buf)
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
518 endfunc
505d97ea54da patch 8.2.1022: various parts of code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 20041
diff changeset
519
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
520 func Test_digraph_set_function()
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
521 new
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
522 call digraph_set('aa', 'あ')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
523 call Put_Dig('aa')
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
524 call assert_equal('あ', getline('$'))
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
525 call digraph_set(' i', 'い')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
526 call Put_Dig(' i')
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
527 call assert_equal('い', getline('$'))
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
528 call digraph_set(' ', 'う')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
529 call Put_Dig(' ')
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
530 call assert_equal('う', getline('$'))
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
531
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
532 eval 'aa'->digraph_set('え')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
533 call Put_Dig('aa')
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
534 call assert_equal('え', getline('$'))
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
535
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
536 call assert_fails('call digraph_set("aaa", "あ")', 'E1214: Digraph must be just two characters: aaa')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
537 call assert_fails('call digraph_set("b", "あ")', 'E1214: Digraph must be just two characters: b')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
538 call assert_fails('call digraph_set("あ", "あ")', 'E1214: Digraph must be just two characters: あ')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
539 call assert_fails('call digraph_set("aa", "ああ")', 'E1215: Digraph must be one character: ああ')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
540 call assert_fails('call digraph_set("aa", "か" .. nr2char(0x3099))', 'E1215: Digraph must be one character: か' .. nr2char(0x3099))
25759
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
541 call assert_fails('call digraph_set(test_null_string(), "い")', 'E1214: Digraph must be just two characters')
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
542 call assert_fails('call digraph_set("aa", 0z10)', 'E976: Using a Blob as a String')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
543 bwipe!
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
544 endfunc
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
545
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
546 func Test_digraph_get_function()
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
547 " Built-in digraphs
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
548 call assert_equal('∞', digraph_get('00'))
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
549
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
550 " User-defined digraphs
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
551 call digraph_set('aa', 'あ')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
552 call digraph_set(' i', 'い')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
553 call digraph_set(' ', 'う')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
554 call assert_equal('あ', digraph_get('aa'))
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
555 call assert_equal('あ', 'aa'->digraph_get())
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
556 call assert_equal('い', digraph_get(' i'))
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
557 call assert_equal('う', digraph_get(' '))
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
558 call assert_fails('call digraph_get("aaa")', 'E1214: Digraph must be just two characters: aaa')
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
559 call assert_fails('call digraph_get("b")', 'E1214: Digraph must be just two characters: b')
25759
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
560 call assert_fails('call digraph_get(test_null_string())', 'E1214: Digraph must be just two characters:')
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
561 call assert_fails('call digraph_get(0z10)', 'E976: Using a Blob as a String')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
562 endfunc
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
563
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
564 func Test_digraph_get_function_encode()
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
565 CheckFeature iconv
25577
6b711b01f2ca patch 8.2.3325: digraph test fails when LC_ALL is set to "C"
Bram Moolenaar <Bram@vim.org>
parents: 25378
diff changeset
566
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
567 let testcases = {
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
568 \'00': '∞',
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
569 \'aa': 'あ',
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
570 \}
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
571 for [key, ch] in items(testcases)
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
572 call digraph_set(key, ch)
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
573 set encoding=japan
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
574 call assert_equal(iconv(ch, 'utf-8', 'japan'), digraph_get(key))
25577
6b711b01f2ca patch 8.2.3325: digraph test fails when LC_ALL is set to "C"
Bram Moolenaar <Bram@vim.org>
parents: 25378
diff changeset
575 set encoding=utf-8
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
576 endfor
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
577 endfunc
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
578
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
579 func Test_digraph_setlist_function()
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
580 call digraph_setlist([['aa', 'き'], ['bb', 'く']])
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
581 call assert_equal('き', digraph_get('aa'))
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
582 call assert_equal('く', digraph_get('bb'))
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
583
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
584 call assert_fails('call digraph_setlist([[]])', 'E1216:')
25759
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
585 call assert_fails('call digraph_setlist([["aa", "b", "cc"]])', 'E1216:')
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
586 call assert_fails('call digraph_setlist([["あ", "あ"]])', 'E1214: Digraph must be just two characters: あ')
25759
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
587 call assert_fails('call digraph_setlist([test_null_list()])', 'E1216:')
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
588 call assert_fails('call digraph_setlist({})', 'E1216:')
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
589 call assert_fails('call digraph_setlist([{}])', 'E1216:')
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
590 call assert_true(digraph_setlist(test_null_list()))
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
591 endfunc
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
592
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
593 func Test_digraph_getlist_function()
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
594 " Make sure user-defined digraphs are defined
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
595 call digraph_setlist([['aa', 'き'], ['bb', 'く']])
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
596
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
597 for pair in digraph_getlist(1)
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
598 call assert_equal(digraph_get(pair[0]), pair[1])
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
599 endfor
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
600
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
601 " We don't know how many digraphs are registered before, so check the number
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
602 " of digraphs returned.
25378
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
603 call assert_equal(digraph_getlist()->len(), digraph_getlist(0)->len())
890fd8211202 patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents: 25294
diff changeset
604 call assert_notequal((digraph_getlist()->len()), digraph_getlist(1)->len())
25759
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
605
ea0820d05257 patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents: 25577
diff changeset
606 call assert_fails('call digraph_getlist(0z12)', 'E974: Using a Blob as a Number')
25294
c626fd34b66f patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents: 21897
diff changeset
607 endfunc
25577
6b711b01f2ca patch 8.2.3325: digraph test fails when LC_ALL is set to "C"
Bram Moolenaar <Bram@vim.org>
parents: 25378
diff changeset
608
6b711b01f2ca patch 8.2.3325: digraph test fails when LC_ALL is set to "C"
Bram Moolenaar <Bram@vim.org>
parents: 25378
diff changeset
609
9909
3ee84d270ea7 commit https://github.com/vim/vim/commit/9e4d8215d386100ab660d7d11e6620fd148b605e
Christian Brabandt <cb@256bit.org>
parents: 9622
diff changeset
610 " vim: shiftwidth=2 sts=2 expandtab