6947
|
1
|
|
2 # This is a Test
|
|
3
|
|
4 Test 1: simple addmatch()
|
|
5 # This is a Test
|
|
6 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
7
|
|
8 Test 2: simple addmatch() and conceal (should be: #XThisXisXaXTest)
|
|
9 #XThisXisXaXTest
|
|
10 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
11
|
|
12 Test 3: addmatch() and conceallevel=3 (should be: #ThisisaTest)
|
|
13 #ThisisaTest
|
|
14 OK: g:attr[0]==g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]!=g:attr[5]
|
|
15
|
|
16 Test 4: more match() (should be: #Thisisa Test)
|
|
17 #Thisisa Test
|
|
18 OK: g:attr[0]==g:attr[1] && g:attr[1]==g:attr[2] && g:attr[0]!=g:attr[3] && g:attr[3]==g:attr[4] && g:attr[0]!=g:attr[5] && g:attr[3]!=g:attr[5]
|
|
19
|
|
20 Test 5/1: default conceal char (should be: # This is a Test)
|
|
21 # This is a Test
|
|
22 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
23
|
|
24 Test 5/2: default conceal char (should be: #+This+is+a+Test)
|
|
25 #+This+is+a+Test
|
|
26 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
27
|
|
28 Test 6/1: syn and match conceal (should be: #ZThisZisZaZTest)
|
|
29 #ZThisZisZaZTest
|
|
30 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
31
|
|
32 Test 6/2: syn and match conceal (should be: #*This*is*a*Test)
|
|
33 #*This*is*a*Test
|
|
34 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
35
|
|
36 Test 7/1: clear matches
|
|
37 # This is a Test
|
|
38 OK: g:attr[0]==g:attr[1] && g:attr[0]==g:attr[2] && g:attr[0]==g:attr[3] && g:attr[0]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
39 {'group': 'Conceal', 'pattern': '\%2l ', 'priority': 10, 'id': 10, 'conceal': 'Z'}
|
|
40
|
|
41 Test 7/2: reset match using setmatches()
|
|
42 #ZThisZisZaZTest
|
|
43 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|
|
44
|
|
45 Test 8: using matchaddpos() (should be #Pis a Test
|
|
46 #Pis a Test
|
|
47 OK: g:attr[0]!=g:attr[1] && g:attr[1]!=g:attr[2] && g:attr[0]==g:attr[2] && g:attr[0]==g:attr[3] && g:attr[0]!=g:attr[4] && g:attr[0]!=g:attr[5] && g:attr[4]==g:attr[5]
|
|
48 {'group': 'Conceal', 'id': 11, 'priority': 10, 'pos1': [2, 2, 6], 'conceal': 'P'}
|
|
49
|
|
50 Test 9: match using multibyte conceal char (should be: #ˑThisˑisˑaˑTest)
|
|
51 #ˑThisˑisˑaˑTest
|
|
52 OK: g:attr[0]!=g:attr[1] && g:attr[1]==g:attr[2] && g:attr[1]==g:attr[3] && g:attr[1]==g:attr[4] && g:attr[0]==g:attr[5]
|