mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	Rewrite hexadecimal escape sequences as decimal in lua strings
The hexadecimal notation is a Luajit extension which is not compatible with Lua 5.1. While Lua 5.2 does support hexadecimal sequences, it is better to target Lua 5.1 for maximum compatibility with Luajit(which has fully compatible with 5.1 API/ABI).
This commit is contained in:
		| @@ -30,7 +30,7 @@ local function diff(text, nodedent) | |||||||
| end | end | ||||||
|  |  | ||||||
| describe('character classes in regexp', function() | describe('character classes in regexp', function() | ||||||
|   local ctrl1 = '\t\x0c\r' |   local ctrl1 = '\t\012\r' | ||||||
|   local punct1 = " !\"#$%&'()#+'-./" |   local punct1 = " !\"#$%&'()#+'-./" | ||||||
|   local digits = '0123456789' |   local digits = '0123456789' | ||||||
|   local punct2 = ':;<=>?@' |   local punct2 = ':;<=>?@' | ||||||
| @@ -38,8 +38,8 @@ describe('character classes in regexp', function() | |||||||
|   local punct3 = '[\\]^_`' |   local punct3 = '[\\]^_`' | ||||||
|   local lower = 'abcdefghiwxyz' |   local lower = 'abcdefghiwxyz' | ||||||
|   local punct4 = '{|}~' |   local punct4 = '{|}~' | ||||||
|   local ctrl2 = '\x7f\x80\x82\x90\x9b' |   local ctrl2 = '\127\128\130\144\155' | ||||||
|   local iso_text = '\xa6\xb1\xbc\xc7\xd3\xe9' -- "¦±¼ÇÓé" in utf-8 |   local iso_text = '\166\177\188\199\211\233' -- "¦±¼ÇÓé" in utf-8 | ||||||
|   setup(function() |   setup(function() | ||||||
|     -- The original test32.in file was not in utf-8 encoding and did also |     -- The original test32.in file was not in utf-8 encoding and did also | ||||||
|     -- contain some control characters.  We use lua escape sequences to write |     -- contain some control characters.  We use lua escape sequences to write | ||||||
|   | |||||||
| @@ -187,7 +187,7 @@ describe('Visual block mode', function() | |||||||
|       98<Nul>65 |       98<Nul>65 | ||||||
|       98<Nul>65]] |       98<Nul>65]] | ||||||
|     expected = expected:gsub('<CR>', '\r') |     expected = expected:gsub('<CR>', '\r') | ||||||
|     expected = expected:gsub('<Nul>', '\x00') |     expected = expected:gsub('<Nul>', '\000') | ||||||
|  |  | ||||||
|     expect(expected) |     expect(expected) | ||||||
|   end) |   end) | ||||||
|   | |||||||
| @@ -191,7 +191,7 @@ describe('undo tree:', function() | |||||||
|   end) |   end) | ||||||
|  |  | ||||||
|   it('undo an expression-register', function() |   it('undo an expression-register', function() | ||||||
|     local normal_commands = 'o1\x1ba2\x12=string(123)\n\x1b' |     local normal_commands = 'o1\027a2\018=string(123)\n\027' | ||||||
|     write_file('Xtest.source', normal_commands) |     write_file('Xtest.source', normal_commands) | ||||||
|  |  | ||||||
|     feed('oa<esc>') |     feed('oa<esc>') | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ describe('tag search with !_TAG_FILE_ENCODING', function() | |||||||
|       ]]) |       ]]) | ||||||
|     write_file('test83-tags2', |     write_file('test83-tags2', | ||||||
|       '!_TAG_FILE_ENCODING	cp932	//\n' .. |       '!_TAG_FILE_ENCODING	cp932	//\n' .. | ||||||
|       '\x82`\x82a\x82b	Xtags2.txt	/\x82`\x82a\x82b\n' |       '\130`\130a\130b	Xtags2.txt	/\130`\130a\130b\n' | ||||||
|       ) |       ) | ||||||
|     -- The last file is very long but repetetive and can be generated on the |     -- The last file is very long but repetetive and can be generated on the | ||||||
|     -- fly. |     -- fly. | ||||||
| @@ -32,7 +32,7 @@ describe('tag search with !_TAG_FILE_ENCODING', function() | |||||||
|       !_TAG_FILE_SORTED	1	// |       !_TAG_FILE_SORTED	1	// | ||||||
|       !_TAG_FILE_ENCODING	cp932	// |       !_TAG_FILE_ENCODING	cp932	// | ||||||
|       ]]) |       ]]) | ||||||
|     local line = '	Xtags3.txt	/\x82`\x82a\x82b\n' |     local line = '	Xtags3.txt	/\130`\130a\130b\n' | ||||||
|     for i = 1, 100 do |     for i = 1, 100 do | ||||||
|       text = text .. 'abc' .. i .. line |       text = text .. 'abc' .. i .. line | ||||||
|     end |     end | ||||||
|   | |||||||
| @@ -54,8 +54,8 @@ describe('eval', function() | |||||||
|     expect([[ |     expect([[ | ||||||
|        |        | ||||||
|       ": type v; value: abc (['abc']), expr: abc (['abc']) |       ": type v; value: abc (['abc']), expr: abc (['abc']) | ||||||
|       ": type V; value: abc]].."\x00 (['abc']), expr: abc\x00"..[[ (['abc']) |       ": type V; value: abc]].."\000 (['abc']), expr: abc\000"..[[ (['abc']) | ||||||
|       ": type V; value: abc]].."\r\x00 (['abc\r']), expr: abc\r\x00 (['abc\r"..[[']) |       ": type V; value: abc]].."\r\000 (['abc\r']), expr: abc\r\000 (['abc\r"..[[']) | ||||||
|       =: type v; value: abc (['abc']), expr: "abc" (['"abc"'])]]) |       =: type v; value: abc (['abc']), expr: "abc" (['"abc"'])]]) | ||||||
|   end) |   end) | ||||||
|  |  | ||||||
| @@ -97,29 +97,29 @@ describe('eval', function() | |||||||
|       == |       == | ||||||
|       =abcB= |       =abcB= | ||||||
|       {{{2 setreg('c', 'abcC', 'l') |       {{{2 setreg('c', 'abcC', 'l') | ||||||
|       c: type V; value: abcC]].."\x00 (['abcC']), expr: abcC\x00"..[[ (['abcC']) |       c: type V; value: abcC]].."\000 (['abcC']), expr: abcC\000"..[[ (['abcC']) | ||||||
|       == |       == | ||||||
|       abcC |       abcC | ||||||
|       == |       == | ||||||
|       {{{2 setreg('d', 'abcD', 'V') |       {{{2 setreg('d', 'abcD', 'V') | ||||||
|       d: type V; value: abcD]].."\x00 (['abcD']), expr: abcD\x00"..[[ (['abcD']) |       d: type V; value: abcD]].."\000 (['abcD']), expr: abcD\000"..[[ (['abcD']) | ||||||
|       == |       == | ||||||
|       abcD |       abcD | ||||||
|       == |       == | ||||||
|       {{{2 setreg('e', 'abcE', 'b') |       {{{2 setreg('e', 'abcE', 'b') | ||||||
|       e: type ]]..'\x16'..[[4; value: abcE (['abcE']), expr: abcE (['abcE']) |       e: type ]]..'\022'..[[4; value: abcE (['abcE']), expr: abcE (['abcE']) | ||||||
|       == |       == | ||||||
|       =abcE= |       =abcE= | ||||||
|       {{{2 setreg('f', 'abcF', ']]..'\x16'..[[') |       {{{2 setreg('f', 'abcF', ']]..'\022'..[[') | ||||||
|       f: type ]]..'\x16'..[[4; value: abcF (['abcF']), expr: abcF (['abcF']) |       f: type ]]..'\022'..[[4; value: abcF (['abcF']), expr: abcF (['abcF']) | ||||||
|       == |       == | ||||||
|       =abcF= |       =abcF= | ||||||
|       {{{2 setreg('g', 'abcG', 'b10') |       {{{2 setreg('g', 'abcG', 'b10') | ||||||
|       g: type ]]..'\x16'..[[10; value: abcG (['abcG']), expr: abcG (['abcG']) |       g: type ]]..'\022'..[[10; value: abcG (['abcG']), expr: abcG (['abcG']) | ||||||
|       == |       == | ||||||
|       =abcG      = |       =abcG      = | ||||||
|       {{{2 setreg('h', 'abcH', ']]..'\x16'..[[10') |       {{{2 setreg('h', 'abcH', ']]..'\022'..[[10') | ||||||
|       h: type ]]..'\x16'..[[10; value: abcH (['abcH']), expr: abcH (['abcH']) |       h: type ]]..'\022'..[[10; value: abcH (['abcH']), expr: abcH (['abcH']) | ||||||
|       == |       == | ||||||
|       =abcH      = |       =abcH      = | ||||||
|       {{{2 setreg('I', 'abcI') |       {{{2 setreg('I', 'abcI') | ||||||
| @@ -132,12 +132,12 @@ describe('eval', function() | |||||||
|       == |       == | ||||||
|       =abcAabcAc= |       =abcAabcAc= | ||||||
|       {{{2 setreg('A', 'abcAl', 'l') |       {{{2 setreg('A', 'abcAl', 'l') | ||||||
|       A: type V; value: abcAabcAcabcAl]].."\x00 (['abcAabcAcabcAl']), expr: abcAabcAcabcAl\x00"..[[ (['abcAabcAcabcAl']) |       A: type V; value: abcAabcAcabcAl]].."\000 (['abcAabcAcabcAl']), expr: abcAabcAcabcAl\000"..[[ (['abcAabcAcabcAl']) | ||||||
|       == |       == | ||||||
|       abcAabcAcabcAl |       abcAabcAcabcAl | ||||||
|       == |       == | ||||||
|       {{{2 setreg('A', 'abcAc2', 'c') |       {{{2 setreg('A', 'abcAc2', 'c') | ||||||
|       A: type v; value: abcAabcAcabcAl]].."\x00abcAc2 (['abcAabcAcabcAl', 'abcAc2']), expr: abcAabcAcabcAl\x00"..[[abcAc2 (['abcAabcAcabcAl', 'abcAc2']) |       A: type v; value: abcAabcAcabcAl]].."\000abcAc2 (['abcAabcAcabcAl', 'abcAc2']), expr: abcAabcAcabcAl\000"..[[abcAc2 (['abcAabcAcabcAl', 'abcAc2']) | ||||||
|       == |       == | ||||||
|       =abcAabcAcabcAl |       =abcAabcAcabcAl | ||||||
|       abcAc2= |       abcAc2= | ||||||
| @@ -146,50 +146,50 @@ describe('eval', function() | |||||||
|       == |       == | ||||||
|       =abcBabcBc= |       =abcBabcBc= | ||||||
|       {{{2 setreg('b', 'abcBb', 'ba') |       {{{2 setreg('b', 'abcBb', 'ba') | ||||||
|       b: type ]]..'\x16'..[[5; value: abcBabcBcabcBb (['abcBabcBcabcBb']), expr: abcBabcBcabcBb (['abcBabcBcabcBb']) |       b: type ]]..'\022'..[[5; value: abcBabcBcabcBb (['abcBabcBcabcBb']), expr: abcBabcBcabcBb (['abcBabcBcabcBb']) | ||||||
|       == |       == | ||||||
|       =abcBabcBcabcBb= |       =abcBabcBcabcBb= | ||||||
|       {{{2 setreg('b', 'abcBc2', 'ca') |       {{{2 setreg('b', 'abcBc2', 'ca') | ||||||
|       b: type v; value: abcBabcBcabcBb]].."\x00abcBc2 (['abcBabcBcabcBb', 'abcBc2']), expr: abcBabcBcabcBb\x00"..[[abcBc2 (['abcBabcBcabcBb', 'abcBc2']) |       b: type v; value: abcBabcBcabcBb]].."\000abcBc2 (['abcBabcBcabcBb', 'abcBc2']), expr: abcBabcBcabcBb\000"..[[abcBc2 (['abcBabcBcabcBb', 'abcBc2']) | ||||||
|       == |       == | ||||||
|       =abcBabcBcabcBb |       =abcBabcBcabcBb | ||||||
|       abcBc2= |       abcBc2= | ||||||
|       {{{2 setreg('b', 'abcBb2', 'b50a') |       {{{2 setreg('b', 'abcBb2', 'b50a') | ||||||
|       b: type ]].."\x1650; value: abcBabcBcabcBb\x00abcBc2abcBb2 (['abcBabcBcabcBb', 'abcBc2abcBb2']), expr: abcBabcBcabcBb\x00"..[[abcBc2abcBb2 (['abcBabcBcabcBb', 'abcBc2abcBb2']) |       b: type ]].."\02250; value: abcBabcBcabcBb\000abcBc2abcBb2 (['abcBabcBcabcBb', 'abcBc2abcBb2']), expr: abcBabcBcabcBb\000"..[[abcBc2abcBb2 (['abcBabcBcabcBb', 'abcBc2abcBb2']) | ||||||
|       == |       == | ||||||
|       =abcBabcBcabcBb                                    = |       =abcBabcBcabcBb                                    = | ||||||
|        abcBc2abcBb2 |        abcBc2abcBb2 | ||||||
|       {{{2 setreg('C', 'abcCl', 'l') |       {{{2 setreg('C', 'abcCl', 'l') | ||||||
|       C: type V; value: abcC]].."\x00abcCl\x00 (['abcC', 'abcCl']), expr: abcC\x00abcCl\x00"..[[ (['abcC', 'abcCl']) |       C: type V; value: abcC]].."\000abcCl\000 (['abcC', 'abcCl']), expr: abcC\000abcCl\000"..[[ (['abcC', 'abcCl']) | ||||||
|       == |       == | ||||||
|       abcC |       abcC | ||||||
|       abcCl |       abcCl | ||||||
|       == |       == | ||||||
|       {{{2 setreg('C', 'abcCc', 'c') |       {{{2 setreg('C', 'abcCc', 'c') | ||||||
|       C: type v; value: abcC]].."\x00abcCl\x00abcCc (['abcC', 'abcCl', 'abcCc']), expr: abcC\x00abcCl\x00"..[[abcCc (['abcC', 'abcCl', 'abcCc']) |       C: type v; value: abcC]].."\000abcCl\000abcCc (['abcC', 'abcCl', 'abcCc']), expr: abcC\000abcCl\000"..[[abcCc (['abcC', 'abcCl', 'abcCc']) | ||||||
|       == |       == | ||||||
|       =abcC |       =abcC | ||||||
|       abcCl |       abcCl | ||||||
|       abcCc= |       abcCc= | ||||||
|       {{{2 setreg('D', 'abcDb', 'b') |       {{{2 setreg('D', 'abcDb', 'b') | ||||||
|       D: type ]].."\x165; value: abcD\x00abcDb (['abcD', 'abcDb']), expr: abcD\x00"..[[abcDb (['abcD', 'abcDb']) |       D: type ]].."\0225; value: abcD\000abcDb (['abcD', 'abcDb']), expr: abcD\000"..[[abcDb (['abcD', 'abcDb']) | ||||||
|       == |       == | ||||||
|       =abcD = |       =abcD = | ||||||
|        abcDb |        abcDb | ||||||
|       {{{2 setreg('E', 'abcEb', 'b') |       {{{2 setreg('E', 'abcEb', 'b') | ||||||
|       E: type ]].."\x165; value: abcE\x00abcEb (['abcE', 'abcEb']), expr: abcE\x00"..[[abcEb (['abcE', 'abcEb']) |       E: type ]].."\0225; value: abcE\000abcEb (['abcE', 'abcEb']), expr: abcE\000"..[[abcEb (['abcE', 'abcEb']) | ||||||
|       == |       == | ||||||
|       =abcE = |       =abcE = | ||||||
|        abcEb |        abcEb | ||||||
|       {{{2 setreg('E', 'abcEl', 'l') |       {{{2 setreg('E', 'abcEl', 'l') | ||||||
|       E: type V; value: abcE]].."\x00abcEb\x00abcEl\x00 (['abcE', 'abcEb', 'abcEl']), expr: abcE\x00abcEb\x00abcEl\x00"..[[ (['abcE', 'abcEb', 'abcEl']) |       E: type V; value: abcE]].."\000abcEb\000abcEl\000 (['abcE', 'abcEb', 'abcEl']), expr: abcE\000abcEb\000abcEl\000"..[[ (['abcE', 'abcEb', 'abcEl']) | ||||||
|       == |       == | ||||||
|       abcE |       abcE | ||||||
|       abcEb |       abcEb | ||||||
|       abcEl |       abcEl | ||||||
|       == |       == | ||||||
|       {{{2 setreg('F', 'abcFc', 'c') |       {{{2 setreg('F', 'abcFc', 'c') | ||||||
|       F: type v; value: abcF]].."\x00abcFc (['abcF', 'abcFc']), expr: abcF\x00"..[[abcFc (['abcF', 'abcFc']) |       F: type v; value: abcF]].."\000abcFc (['abcF', 'abcFc']), expr: abcF\000"..[[abcFc (['abcF', 'abcFc']) | ||||||
|       == |       == | ||||||
|       =abcF |       =abcF | ||||||
|       abcFc=]]) |       abcFc=]]) | ||||||
| @@ -219,36 +219,36 @@ describe('eval', function() | |||||||
|     execute([[call SetReg('F', "\n", 'b')]]) |     execute([[call SetReg('F', "\n", 'b')]]) | ||||||
|     expect([[ |     expect([[ | ||||||
|        |        | ||||||
|       {{{2 setreg('A', ']]..'\x00'..[[') |       {{{2 setreg('A', ']]..'\000'..[[') | ||||||
|       A: type V; value: abcA2]].."\x00 (['abcA2']), expr: abcA2\x00"..[[ (['abcA2']) |       A: type V; value: abcA2]].."\000 (['abcA2']), expr: abcA2\000"..[[ (['abcA2']) | ||||||
|       == |       == | ||||||
|       abcA2 |       abcA2 | ||||||
|       == |       == | ||||||
|       {{{2 setreg('B', ']]..'\x00'..[[', 'c') |       {{{2 setreg('B', ']]..'\000'..[[', 'c') | ||||||
|       B: type v; value: abcB2]].."\x00 (['abcB2', '']), expr: abcB2\x00"..[[ (['abcB2', '']) |       B: type v; value: abcB2]].."\000 (['abcB2', '']), expr: abcB2\000"..[[ (['abcB2', '']) | ||||||
|       == |       == | ||||||
|       =abcB2 |       =abcB2 | ||||||
|       = |       = | ||||||
|       {{{2 setreg('C', ']]..'\x00'..[[') |       {{{2 setreg('C', ']]..'\000'..[[') | ||||||
|       C: type V; value: abcC2]].."\x00\x00 (['abcC2', '']), expr: abcC2\x00\x00"..[[ (['abcC2', '']) |       C: type V; value: abcC2]].."\000\000 (['abcC2', '']), expr: abcC2\000\000"..[[ (['abcC2', '']) | ||||||
|       == |       == | ||||||
|       abcC2 |       abcC2 | ||||||
|        |        | ||||||
|       == |       == | ||||||
|       {{{2 setreg('D', ']]..'\x00'..[[', 'l') |       {{{2 setreg('D', ']]..'\000'..[[', 'l') | ||||||
|       D: type V; value: abcD2]].."\x00\x00 (['abcD2', '']), expr: abcD2\x00\x00"..[[ (['abcD2', '']) |       D: type V; value: abcD2]].."\000\000 (['abcD2', '']), expr: abcD2\000\000"..[[ (['abcD2', '']) | ||||||
|       == |       == | ||||||
|       abcD2 |       abcD2 | ||||||
|        |        | ||||||
|       == |       == | ||||||
|       {{{2 setreg('E', ']]..'\x00'..[[') |       {{{2 setreg('E', ']]..'\000'..[[') | ||||||
|       E: type V; value: abcE2]].."\x00\x00 (['abcE2', '']), expr: abcE2\x00\x00"..[[ (['abcE2', '']) |       E: type V; value: abcE2]].."\000\000 (['abcE2', '']), expr: abcE2\000\000"..[[ (['abcE2', '']) | ||||||
|       == |       == | ||||||
|       abcE2 |       abcE2 | ||||||
|        |        | ||||||
|       == |       == | ||||||
|       {{{2 setreg('F', ']]..'\x00'..[[', 'b') |       {{{2 setreg('F', ']]..'\000'..[[', 'b') | ||||||
|       F: type ]].."\x160; value: abcF2\x00 (['abcF2', '']), expr: abcF2\x00"..[[ (['abcF2', '']) |       F: type ]].."\0220; value: abcF2\000 (['abcF2', '']), expr: abcF2\000"..[[ (['abcF2', '']) | ||||||
|       == |       == | ||||||
|       =abcF2= |       =abcF2= | ||||||
|        ]]) |        ]]) | ||||||
| @@ -282,21 +282,21 @@ describe('eval', function() | |||||||
|       == |       == | ||||||
|       =abcA3= |       =abcA3= | ||||||
|       {{{2 setreg('b', ['abcB3'], 'l') |       {{{2 setreg('b', ['abcB3'], 'l') | ||||||
|       b: type V; value: abcB3]].."\x00 (['abcB3']), expr: abcB3\x00"..[[ (['abcB3']) |       b: type V; value: abcB3]].."\000 (['abcB3']), expr: abcB3\000"..[[ (['abcB3']) | ||||||
|       == |       == | ||||||
|       abcB3 |       abcB3 | ||||||
|       == |       == | ||||||
|       {{{2 setreg('c', ['abcC3'], 'b') |       {{{2 setreg('c', ['abcC3'], 'b') | ||||||
|       c: type ]]..'\x16'..[[5; value: abcC3 (['abcC3']), expr: abcC3 (['abcC3']) |       c: type ]]..'\022'..[[5; value: abcC3 (['abcC3']), expr: abcC3 (['abcC3']) | ||||||
|       == |       == | ||||||
|       =abcC3= |       =abcC3= | ||||||
|       {{{2 setreg('d', ['abcD3']) |       {{{2 setreg('d', ['abcD3']) | ||||||
|       d: type V; value: abcD3]].."\x00 (['abcD3']), expr: abcD3\x00"..[[ (['abcD3']) |       d: type V; value: abcD3]].."\000 (['abcD3']), expr: abcD3\000"..[[ (['abcD3']) | ||||||
|       == |       == | ||||||
|       abcD3 |       abcD3 | ||||||
|       == |       == | ||||||
|       {{{2 setreg('e', [1, 2, 'abc', 3]) |       {{{2 setreg('e', [1, 2, 'abc', 3]) | ||||||
|       e: type V; value: 1]].."\x002\x00abc\x003\x00 (['1', '2', 'abc', '3']), expr: 1\x002\x00abc\x003\x00"..[[ (['1', '2', 'abc', '3']) |       e: type V; value: 1]].."\0002\000abc\0003\000 (['1', '2', 'abc', '3']), expr: 1\0002\000abc\0003\000"..[[ (['1', '2', 'abc', '3']) | ||||||
|       == |       == | ||||||
|       1 |       1 | ||||||
|       2 |       2 | ||||||
| @@ -304,7 +304,7 @@ describe('eval', function() | |||||||
|       3 |       3 | ||||||
|       == |       == | ||||||
|       {{{2 setreg('f', [1, 2, 3]) |       {{{2 setreg('f', [1, 2, 3]) | ||||||
|       f: type V; value: 1]].."\x002\x003\x00 (['1', '2', '3']), expr: 1\x002\x003\x00"..[[ (['1', '2', '3']) |       f: type V; value: 1]].."\0002\0003\000 (['1', '2', '3']), expr: 1\0002\0003\000"..[[ (['1', '2', '3']) | ||||||
|       == |       == | ||||||
|       1 |       1 | ||||||
|       2 |       2 | ||||||
| @@ -312,49 +312,49 @@ describe('eval', function() | |||||||
|       == |       == | ||||||
|       {{{1 Appending lists with setreg() |       {{{1 Appending lists with setreg() | ||||||
|       {{{2 setreg('A', ['abcA3c'], 'c') |       {{{2 setreg('A', ['abcA3c'], 'c') | ||||||
|       A: type v; value: abcA3]].."\x00abcA3c (['abcA3', 'abcA3c']), expr: abcA3\x00"..[[abcA3c (['abcA3', 'abcA3c']) |       A: type v; value: abcA3]].."\000abcA3c (['abcA3', 'abcA3c']), expr: abcA3\000"..[[abcA3c (['abcA3', 'abcA3c']) | ||||||
|       == |       == | ||||||
|       =abcA3 |       =abcA3 | ||||||
|       abcA3c= |       abcA3c= | ||||||
|       {{{2 setreg('b', ['abcB3l'], 'la') |       {{{2 setreg('b', ['abcB3l'], 'la') | ||||||
|       b: type V; value: abcB3]].."\x00abcB3l\x00 (['abcB3', 'abcB3l']), expr: abcB3\x00abcB3l\x00"..[[ (['abcB3', 'abcB3l']) |       b: type V; value: abcB3]].."\000abcB3l\000 (['abcB3', 'abcB3l']), expr: abcB3\000abcB3l\000"..[[ (['abcB3', 'abcB3l']) | ||||||
|       == |       == | ||||||
|       abcB3 |       abcB3 | ||||||
|       abcB3l |       abcB3l | ||||||
|       == |       == | ||||||
|       {{{2 setreg('C', ['abcC3b'], 'lb') |       {{{2 setreg('C', ['abcC3b'], 'lb') | ||||||
|       C: type ]].."\x166; value: abcC3\x00abcC3b (['abcC3', 'abcC3b']), expr: abcC3\x00"..[[abcC3b (['abcC3', 'abcC3b']) |       C: type ]].."\0226; value: abcC3\000abcC3b (['abcC3', 'abcC3b']), expr: abcC3\000"..[[abcC3b (['abcC3', 'abcC3b']) | ||||||
|       == |       == | ||||||
|       =abcC3 = |       =abcC3 = | ||||||
|        abcC3b |        abcC3b | ||||||
|       {{{2 setreg('D', ['abcD32']) |       {{{2 setreg('D', ['abcD32']) | ||||||
|       D: type V; value: abcD3]].."\x00abcD32\x00 (['abcD3', 'abcD32']), expr: abcD3\x00abcD32\x00"..[[ (['abcD3', 'abcD32']) |       D: type V; value: abcD3]].."\000abcD32\000 (['abcD3', 'abcD32']), expr: abcD3\000abcD32\000"..[[ (['abcD3', 'abcD32']) | ||||||
|       == |       == | ||||||
|       abcD3 |       abcD3 | ||||||
|       abcD32 |       abcD32 | ||||||
|       == |       == | ||||||
|       {{{2 setreg('A', ['abcA32']) |       {{{2 setreg('A', ['abcA32']) | ||||||
|       A: type V; value: abcA3]].."\x00abcA3c\x00abcA32\x00 (['abcA3', 'abcA3c', 'abcA32']), expr: abcA3\x00abcA3c\x00abcA32\x00"..[[ (['abcA3', 'abcA3c', 'abcA32']) |       A: type V; value: abcA3]].."\000abcA3c\000abcA32\000 (['abcA3', 'abcA3c', 'abcA32']), expr: abcA3\000abcA3c\000abcA32\000"..[[ (['abcA3', 'abcA3c', 'abcA32']) | ||||||
|       == |       == | ||||||
|       abcA3 |       abcA3 | ||||||
|       abcA3c |       abcA3c | ||||||
|       abcA32 |       abcA32 | ||||||
|       == |       == | ||||||
|       {{{2 setreg('B', ['abcB3c'], 'c') |       {{{2 setreg('B', ['abcB3c'], 'c') | ||||||
|       B: type v; value: abcB3]].."\x00abcB3l\x00abcB3c (['abcB3', 'abcB3l', 'abcB3c']), expr: abcB3\x00abcB3l\x00"..[[abcB3c (['abcB3', 'abcB3l', 'abcB3c']) |       B: type v; value: abcB3]].."\000abcB3l\000abcB3c (['abcB3', 'abcB3l', 'abcB3c']), expr: abcB3\000abcB3l\000"..[[abcB3c (['abcB3', 'abcB3l', 'abcB3c']) | ||||||
|       == |       == | ||||||
|       =abcB3 |       =abcB3 | ||||||
|       abcB3l |       abcB3l | ||||||
|       abcB3c= |       abcB3c= | ||||||
|       {{{2 setreg('C', ['abcC3l'], 'l') |       {{{2 setreg('C', ['abcC3l'], 'l') | ||||||
|       C: type V; value: abcC3]].."\x00abcC3b\x00abcC3l\x00 (['abcC3', 'abcC3b', 'abcC3l']), expr: abcC3\x00abcC3b\x00abcC3l\x00"..[[ (['abcC3', 'abcC3b', 'abcC3l']) |       C: type V; value: abcC3]].."\000abcC3b\000abcC3l\000 (['abcC3', 'abcC3b', 'abcC3l']), expr: abcC3\000abcC3b\000abcC3l\000"..[[ (['abcC3', 'abcC3b', 'abcC3l']) | ||||||
|       == |       == | ||||||
|       abcC3 |       abcC3 | ||||||
|       abcC3b |       abcC3b | ||||||
|       abcC3l |       abcC3l | ||||||
|       == |       == | ||||||
|       {{{2 setreg('D', ['abcD3b'], 'b') |       {{{2 setreg('D', ['abcD3b'], 'b') | ||||||
|       D: type ]].."\x166; value: abcD3\x00abcD32\x00abcD3b (['abcD3', 'abcD32', 'abcD3b']), expr: abcD3\x00abcD32\x00"..[[abcD3b (['abcD3', 'abcD32', 'abcD3b']) |       D: type ]].."\0226; value: abcD3\000abcD32\000abcD3b (['abcD3', 'abcD32', 'abcD3b']), expr: abcD3\000abcD32\000"..[[abcD3b (['abcD3', 'abcD32', 'abcD3b']) | ||||||
|       == |       == | ||||||
|       =abcD3 = |       =abcD3 = | ||||||
|        abcD32 |        abcD32 | ||||||
| @@ -370,50 +370,50 @@ describe('eval', function() | |||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       '{{{1 Appending lists with NL with setreg()\n'.. |       '{{{1 Appending lists with NL with setreg()\n'.. | ||||||
|       "{{{2 setreg('A', ['\x00', 'abcA3l2'], 'l')\n".. |       "{{{2 setreg('A', ['\000', 'abcA3l2'], 'l')\n".. | ||||||
|       "A: type V; value: abcA3\x00abcA3c\x00abcA32\x00\x00\x00abcA3l2\x00 (['abcA3', 'abcA3c', 'abcA32', '\x00', 'abcA3l2']), expr: abcA3\x00abcA3c\x00abcA32\x00\x00\x00abcA3l2\x00 (['abcA3', 'abcA3c', 'abcA32', '\x00', 'abcA3l2'])\n".. |       "A: type V; value: abcA3\000abcA3c\000abcA32\000\000\000abcA3l2\000 (['abcA3', 'abcA3c', 'abcA32', '\000', 'abcA3l2']), expr: abcA3\000abcA3c\000abcA32\000\000\000abcA3l2\000 (['abcA3', 'abcA3c', 'abcA32', '\000', 'abcA3l2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       'abcA3\n'.. |       'abcA3\n'.. | ||||||
|       'abcA3c\n'.. |       'abcA3c\n'.. | ||||||
|       'abcA32\n'.. |       'abcA32\n'.. | ||||||
|       '\x00\n'.. |       '\000\n'.. | ||||||
|       'abcA3l2\n'.. |       'abcA3l2\n'.. | ||||||
|       '==') |       '==') | ||||||
|     execute('%delete') |     execute('%delete') | ||||||
|     execute([=[call SetReg('B', ["\n", 'abcB3c2'], 'c')]=]) |     execute([=[call SetReg('B', ["\n", 'abcB3c2'], 'c')]=]) | ||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       "{{{2 setreg('B', ['\x00', 'abcB3c2'], 'c')\n".. |       "{{{2 setreg('B', ['\000', 'abcB3c2'], 'c')\n".. | ||||||
|       "B: type v; value: abcB3\x00abcB3l\x00abcB3c\x00\x00\x00abcB3c2 (['abcB3', 'abcB3l', 'abcB3c', '\x00', 'abcB3c2']), expr: abcB3\x00abcB3l\x00abcB3c\x00\x00\x00abcB3c2 (['abcB3', 'abcB3l', 'abcB3c', '\x00', 'abcB3c2'])\n".. |       "B: type v; value: abcB3\000abcB3l\000abcB3c\000\000\000abcB3c2 (['abcB3', 'abcB3l', 'abcB3c', '\000', 'abcB3c2']), expr: abcB3\000abcB3l\000abcB3c\000\000\000abcB3c2 (['abcB3', 'abcB3l', 'abcB3c', '\000', 'abcB3c2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       '=abcB3\n'.. |       '=abcB3\n'.. | ||||||
|       'abcB3l\n'.. |       'abcB3l\n'.. | ||||||
|       'abcB3c\n'.. |       'abcB3c\n'.. | ||||||
|       '\x00\n'.. |       '\000\n'.. | ||||||
|       'abcB3c2=') |       'abcB3c2=') | ||||||
|     execute('%delete') |     execute('%delete') | ||||||
|     execute([=[call SetReg('C', ["\n", 'abcC3b2'], 'b')]=]) |     execute([=[call SetReg('C', ["\n", 'abcC3b2'], 'b')]=]) | ||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       "{{{2 setreg('C', ['\x00', 'abcC3b2'], 'b')\n".. |       "{{{2 setreg('C', ['\000', 'abcC3b2'], 'b')\n".. | ||||||
|       "C: type \x167; value: abcC3\x00abcC3b\x00abcC3l\x00\x00\x00abcC3b2 (['abcC3', 'abcC3b', 'abcC3l', '\x00', 'abcC3b2']), expr: abcC3\x00abcC3b\x00abcC3l\x00\x00\x00abcC3b2 (['abcC3', 'abcC3b', 'abcC3l', '\x00', 'abcC3b2'])\n".. |       "C: type \0227; value: abcC3\000abcC3b\000abcC3l\000\000\000abcC3b2 (['abcC3', 'abcC3b', 'abcC3l', '\000', 'abcC3b2']), expr: abcC3\000abcC3b\000abcC3l\000\000\000abcC3b2 (['abcC3', 'abcC3b', 'abcC3l', '\000', 'abcC3b2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       '=abcC3  =\n'.. |       '=abcC3  =\n'.. | ||||||
|       ' abcC3b\n'.. |       ' abcC3b\n'.. | ||||||
|       ' abcC3l\n'.. |       ' abcC3l\n'.. | ||||||
|       ' \x00\n'.. |       ' \000\n'.. | ||||||
|       ' abcC3b2') |       ' abcC3b2') | ||||||
|     execute('%delete') |     execute('%delete') | ||||||
|     execute([=[call SetReg('D', ["\n", 'abcD3b50'],'b50')]=]) |     execute([=[call SetReg('D', ["\n", 'abcD3b50'],'b50')]=]) | ||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       "{{{2 setreg('D', ['\x00', 'abcD3b50'], 'b50')\n".. |       "{{{2 setreg('D', ['\000', 'abcD3b50'], 'b50')\n".. | ||||||
|       "D: type \x1650; value: abcD3\x00abcD32\x00abcD3b\x00\x00\x00abcD3b50 (['abcD3', 'abcD32', 'abcD3b', '\x00', 'abcD3b50']), expr: abcD3\x00abcD32\x00abcD3b\x00\x00\x00abcD3b50 (['abcD3', 'abcD32', 'abcD3b', '\x00', 'abcD3b50'])\n".. |       "D: type \02250; value: abcD3\000abcD32\000abcD3b\000\000\000abcD3b50 (['abcD3', 'abcD32', 'abcD3b', '\000', 'abcD3b50']), expr: abcD3\000abcD32\000abcD3b\000\000\000abcD3b50 (['abcD3', 'abcD32', 'abcD3b', '\000', 'abcD3b50'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       '=abcD3                                             =\n'.. |       '=abcD3                                             =\n'.. | ||||||
|       ' abcD32\n'.. |       ' abcD32\n'.. | ||||||
|       ' abcD3b\n'.. |       ' abcD3b\n'.. | ||||||
|       ' \x00\n'.. |       ' \000\n'.. | ||||||
|       ' abcD3b50') |       ' abcD3b50') | ||||||
|   end) |   end) | ||||||
|  |  | ||||||
| @@ -425,14 +425,14 @@ describe('eval', function() | |||||||
|     execute([=[call SetReg('a', ['abcA4-0', "\n", "abcA4-2\n", "\nabcA4-3", "abcA4-4\nabcA4-4-2"])]=]) |     execute([=[call SetReg('a', ['abcA4-0', "\n", "abcA4-2\n", "\nabcA4-3", "abcA4-4\nabcA4-4-2"])]=]) | ||||||
|     expect( |     expect( | ||||||
|      '\n'.. |      '\n'.. | ||||||
|       "{{{2 setreg('a', ['abcA4-0', '\x00', 'abcA4-2\x00', '\x00abcA4-3', 'abcA4-4\x00abcA4-4-2'])\n".. |       "{{{2 setreg('a', ['abcA4-0', '\000', 'abcA4-2\000', '\000abcA4-3', 'abcA4-4\000abcA4-4-2'])\n".. | ||||||
|       "a: type V; value: abcA4-0\x00\x00\x00abcA4-2\x00\x00\x00abcA4-3\x00abcA4-4\x00abcA4-4-2\x00 (['abcA4-0', '\x00', 'abcA4-2\x00', '\x00abcA4-3', 'abcA4-4\x00abcA4-4-2']), expr: abcA4-0\x00\x00\x00abcA4-2\x00\x00\x00abcA4-3\x00abcA4-4\x00abcA4-4-2\x00 (['abcA4-0', '\x00', 'abcA4-2\x00', '\x00abcA4-3', 'abcA4-4\x00abcA4-4-2'])\n".. |       "a: type V; value: abcA4-0\000\000\000abcA4-2\000\000\000abcA4-3\000abcA4-4\000abcA4-4-2\000 (['abcA4-0', '\000', 'abcA4-2\000', '\000abcA4-3', 'abcA4-4\000abcA4-4-2']), expr: abcA4-0\000\000\000abcA4-2\000\000\000abcA4-3\000abcA4-4\000abcA4-4-2\000 (['abcA4-0', '\000', 'abcA4-2\000', '\000abcA4-3', 'abcA4-4\000abcA4-4-2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       'abcA4-0\n'.. |       'abcA4-0\n'.. | ||||||
|       '\x00\n'.. |       '\000\n'.. | ||||||
|       'abcA4-2\x00\n'.. |       'abcA4-2\000\n'.. | ||||||
|       '\x00abcA4-3\n'.. |       '\000abcA4-3\n'.. | ||||||
|       'abcA4-4\x00abcA4-4-2\n'.. |       'abcA4-4\000abcA4-4-2\n'.. | ||||||
|       '==') |       '==') | ||||||
|   end) |   end) | ||||||
|  |  | ||||||
| @@ -441,14 +441,14 @@ describe('eval', function() | |||||||
|     execute([=[call SetReg('b', ['abcB4c-0', "\n", "abcB4c-2\n", "\nabcB4c-3", "abcB4c-4\nabcB4c-4-2"], 'c')]=]) |     execute([=[call SetReg('b', ['abcB4c-0', "\n", "abcB4c-2\n", "\nabcB4c-3", "abcB4c-4\nabcB4c-4-2"], 'c')]=]) | ||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       "{{{2 setreg('b', ['abcB4c-0', '\x00', 'abcB4c-2\x00', '\x00abcB4c-3', 'abcB4c-4\x00abcB4c-4-2'], 'c')\n".. |       "{{{2 setreg('b', ['abcB4c-0', '\000', 'abcB4c-2\000', '\000abcB4c-3', 'abcB4c-4\000abcB4c-4-2'], 'c')\n".. | ||||||
|       "b: type v; value: abcB4c-0\x00\x00\x00abcB4c-2\x00\x00\x00abcB4c-3\x00abcB4c-4\x00abcB4c-4-2 (['abcB4c-0', '\x00', 'abcB4c-2\x00', '\x00abcB4c-3', 'abcB4c-4\x00abcB4c-4-2']), expr: abcB4c-0\x00\x00\x00abcB4c-2\x00\x00\x00abcB4c-3\x00abcB4c-4\x00abcB4c-4-2 (['abcB4c-0', '\x00', 'abcB4c-2\x00', '\x00abcB4c-3', 'abcB4c-4\x00abcB4c-4-2'])\n".. |       "b: type v; value: abcB4c-0\000\000\000abcB4c-2\000\000\000abcB4c-3\000abcB4c-4\000abcB4c-4-2 (['abcB4c-0', '\000', 'abcB4c-2\000', '\000abcB4c-3', 'abcB4c-4\000abcB4c-4-2']), expr: abcB4c-0\000\000\000abcB4c-2\000\000\000abcB4c-3\000abcB4c-4\000abcB4c-4-2 (['abcB4c-0', '\000', 'abcB4c-2\000', '\000abcB4c-3', 'abcB4c-4\000abcB4c-4-2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       '=abcB4c-0\n'.. |       '=abcB4c-0\n'.. | ||||||
|       '\x00\n'.. |       '\000\n'.. | ||||||
|       'abcB4c-2\x00\n'.. |       'abcB4c-2\000\n'.. | ||||||
|       '\x00abcB4c-3\n'.. |       '\000abcB4c-3\n'.. | ||||||
|       'abcB4c-4\x00abcB4c-4-2=') |       'abcB4c-4\000abcB4c-4-2=') | ||||||
|   end) |   end) | ||||||
|  |  | ||||||
|   it('setting lists with NLs with setreg(), part 3', function() |   it('setting lists with NLs with setreg(), part 3', function() | ||||||
| @@ -456,14 +456,14 @@ describe('eval', function() | |||||||
|     execute([=[call SetReg('c', ['abcC4l-0', "\n", "abcC4l-2\n", "\nabcC4l-3", "abcC4l-4\nabcC4l-4-2"], 'l')]=]) |     execute([=[call SetReg('c', ['abcC4l-0', "\n", "abcC4l-2\n", "\nabcC4l-3", "abcC4l-4\nabcC4l-4-2"], 'l')]=]) | ||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       "{{{2 setreg('c', ['abcC4l-0', '\x00', 'abcC4l-2\x00', '\x00abcC4l-3', 'abcC4l-4\x00abcC4l-4-2'], 'l')\n".. |       "{{{2 setreg('c', ['abcC4l-0', '\000', 'abcC4l-2\000', '\000abcC4l-3', 'abcC4l-4\000abcC4l-4-2'], 'l')\n".. | ||||||
|       "c: type V; value: abcC4l-0\x00\x00\x00abcC4l-2\x00\x00\x00abcC4l-3\x00abcC4l-4\x00abcC4l-4-2\x00 (['abcC4l-0', '\x00', 'abcC4l-2\x00', '\x00abcC4l-3', 'abcC4l-4\x00abcC4l-4-2']), expr: abcC4l-0\x00\x00\x00abcC4l-2\x00\x00\x00abcC4l-3\x00abcC4l-4\x00abcC4l-4-2\x00 (['abcC4l-0', '\x00', 'abcC4l-2\x00', '\x00abcC4l-3', 'abcC4l-4\x00abcC4l-4-2'])\n".. |       "c: type V; value: abcC4l-0\000\000\000abcC4l-2\000\000\000abcC4l-3\000abcC4l-4\000abcC4l-4-2\000 (['abcC4l-0', '\000', 'abcC4l-2\000', '\000abcC4l-3', 'abcC4l-4\000abcC4l-4-2']), expr: abcC4l-0\000\000\000abcC4l-2\000\000\000abcC4l-3\000abcC4l-4\000abcC4l-4-2\000 (['abcC4l-0', '\000', 'abcC4l-2\000', '\000abcC4l-3', 'abcC4l-4\000abcC4l-4-2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       'abcC4l-0\n'.. |       'abcC4l-0\n'.. | ||||||
|       '\x00\n'.. |       '\000\n'.. | ||||||
|       'abcC4l-2\x00\n'.. |       'abcC4l-2\000\n'.. | ||||||
|       '\x00abcC4l-3\n'.. |       '\000abcC4l-3\n'.. | ||||||
|       'abcC4l-4\x00abcC4l-4-2\n'.. |       'abcC4l-4\000abcC4l-4-2\n'.. | ||||||
|       '==') |       '==') | ||||||
|   end) |   end) | ||||||
|   it('setting lists with NLs with setreg(), part 4', function() |   it('setting lists with NLs with setreg(), part 4', function() | ||||||
| @@ -471,28 +471,28 @@ describe('eval', function() | |||||||
|     execute([=[call SetReg('d', ['abcD4b-0', "\n", "abcD4b-2\n", "\nabcD4b-3", "abcD4b-4\nabcD4b-4-2"], 'b')]=]) |     execute([=[call SetReg('d', ['abcD4b-0', "\n", "abcD4b-2\n", "\nabcD4b-3", "abcD4b-4\nabcD4b-4-2"], 'b')]=]) | ||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       "{{{2 setreg('d', ['abcD4b-0', '\x00', 'abcD4b-2\x00', '\x00abcD4b-3', 'abcD4b-4\x00abcD4b-4-2'], 'b')\n".. |       "{{{2 setreg('d', ['abcD4b-0', '\000', 'abcD4b-2\000', '\000abcD4b-3', 'abcD4b-4\000abcD4b-4-2'], 'b')\n".. | ||||||
|       "d: type \x1619; value: abcD4b-0\x00\x00\x00abcD4b-2\x00\x00\x00abcD4b-3\x00abcD4b-4\x00abcD4b-4-2 (['abcD4b-0', '\x00', 'abcD4b-2\x00', '\x00abcD4b-3', 'abcD4b-4\x00abcD4b-4-2']), expr: abcD4b-0\x00\x00\x00abcD4b-2\x00\x00\x00abcD4b-3\x00abcD4b-4\x00abcD4b-4-2 (['abcD4b-0', '\x00', 'abcD4b-2\x00', '\x00abcD4b-3', 'abcD4b-4\x00abcD4b-4-2'])\n".. |       "d: type \02219; value: abcD4b-0\000\000\000abcD4b-2\000\000\000abcD4b-3\000abcD4b-4\000abcD4b-4-2 (['abcD4b-0', '\000', 'abcD4b-2\000', '\000abcD4b-3', 'abcD4b-4\000abcD4b-4-2']), expr: abcD4b-0\000\000\000abcD4b-2\000\000\000abcD4b-3\000abcD4b-4\000abcD4b-4-2 (['abcD4b-0', '\000', 'abcD4b-2\000', '\000abcD4b-3', 'abcD4b-4\000abcD4b-4-2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       '=abcD4b-0           =\n'.. |       '=abcD4b-0           =\n'.. | ||||||
|       ' \x00\n'.. |       ' \000\n'.. | ||||||
|       ' abcD4b-2\x00\n'.. |       ' abcD4b-2\000\n'.. | ||||||
|       ' \x00abcD4b-3\n'.. |       ' \000abcD4b-3\n'.. | ||||||
|       ' abcD4b-4\x00abcD4b-4-2') |       ' abcD4b-4\000abcD4b-4-2') | ||||||
|   end) |   end) | ||||||
|   it('setting lists with NLs with setreg(), part 5', function() |   it('setting lists with NLs with setreg(), part 5', function() | ||||||
|     execute('so test_eval_setup.vim') |     execute('so test_eval_setup.vim') | ||||||
|     execute([=[call SetReg('e', ['abcE4b10-0', "\n", "abcE4b10-2\n", "\nabcE4b10-3", "abcE4b10-4\nabcE4b10-4-2"], 'b10')]=]) |     execute([=[call SetReg('e', ['abcE4b10-0', "\n", "abcE4b10-2\n", "\nabcE4b10-3", "abcE4b10-4\nabcE4b10-4-2"], 'b10')]=]) | ||||||
|     expect( |     expect( | ||||||
|       '\n'.. |       '\n'.. | ||||||
|       "{{{2 setreg('e', ['abcE4b10-0', '\x00', 'abcE4b10-2\x00', '\x00abcE4b10-3', 'abcE4b10-4\x00abcE4b10-4-2'], 'b10')\n".. |       "{{{2 setreg('e', ['abcE4b10-0', '\000', 'abcE4b10-2\000', '\000abcE4b10-3', 'abcE4b10-4\000abcE4b10-4-2'], 'b10')\n".. | ||||||
|       "e: type \x1610; value: abcE4b10-0\x00\x00\x00abcE4b10-2\x00\x00\x00abcE4b10-3\x00abcE4b10-4\x00abcE4b10-4-2 (['abcE4b10-0', '\x00', 'abcE4b10-2\x00', '\x00abcE4b10-3', 'abcE4b10-4\x00abcE4b10-4-2']), expr: abcE4b10-0\x00\x00\x00abcE4b10-2\x00\x00\x00abcE4b10-3\x00abcE4b10-4\x00abcE4b10-4-2 (['abcE4b10-0', '\x00', 'abcE4b10-2\x00', '\x00abcE4b10-3', 'abcE4b10-4\x00abcE4b10-4-2'])\n".. |       "e: type \02210; value: abcE4b10-0\000\000\000abcE4b10-2\000\000\000abcE4b10-3\000abcE4b10-4\000abcE4b10-4-2 (['abcE4b10-0', '\000', 'abcE4b10-2\000', '\000abcE4b10-3', 'abcE4b10-4\000abcE4b10-4-2']), expr: abcE4b10-0\000\000\000abcE4b10-2\000\000\000abcE4b10-3\000abcE4b10-4\000abcE4b10-4-2 (['abcE4b10-0', '\000', 'abcE4b10-2\000', '\000abcE4b10-3', 'abcE4b10-4\000abcE4b10-4-2'])\n".. | ||||||
|       '==\n'.. |       '==\n'.. | ||||||
|       '=abcE4b10-0=\n'.. |       '=abcE4b10-0=\n'.. | ||||||
|       ' \x00\n'.. |       ' \000\n'.. | ||||||
|       ' abcE4b10-2\x00\n'.. |       ' abcE4b10-2\000\n'.. | ||||||
|       ' \x00abcE4b10-3\n'.. |       ' \000abcE4b10-3\n'.. | ||||||
|       ' abcE4b10-4\x00abcE4b10-4-2') |       ' abcE4b10-4\000abcE4b10-4-2') | ||||||
|   end) |   end) | ||||||
|  |  | ||||||
|   it('search and expressions', function() |   it('search and expressions', function() | ||||||
| @@ -507,14 +507,14 @@ describe('eval', function() | |||||||
|       /: type v; value: abc/ (['abc/']), expr: abc/ (['abc/']) |       /: type v; value: abc/ (['abc/']), expr: abc/ (['abc/']) | ||||||
|       == |       == | ||||||
|       =abc/= |       =abc/= | ||||||
|       {{{2 setreg('/', ['abc/]]..'\x00'..[[']) |       {{{2 setreg('/', ['abc/]]..'\000'..[[']) | ||||||
|       /: type v; value: abc/]].."\x00 (['abc/\x00']), expr: abc/\x00 (['abc/\x00"..[[']) |       /: type v; value: abc/]].."\000 (['abc/\000']), expr: abc/\000 (['abc/\000"..[[']) | ||||||
|       == |       == | ||||||
|       =abc/]]..'\x00'..[[= |       =abc/]]..'\000'..[[= | ||||||
|       {{{2 setreg('=', ['"abc/"']) |       {{{2 setreg('=', ['"abc/"']) | ||||||
|       =: type v; value: abc/ (['abc/']), expr: "abc/" (['"abc/"']) |       =: type v; value: abc/ (['abc/']), expr: "abc/" (['"abc/"']) | ||||||
|       {{{2 setreg('=', ['"abc/]]..'\x00'..[["']) |       {{{2 setreg('=', ['"abc/]]..'\000'..[["']) | ||||||
|       =: type v; value: abc/]].."\x00 (['abc/\x00"..[[']), expr: "abc/]]..'\x00'..[[" (['"abc/]]..'\x00'..[["'])]]) |       =: type v; value: abc/]].."\000 (['abc/\000"..[[']), expr: "abc/]]..'\000'..[[" (['"abc/]]..'\000'..[["'])]]) | ||||||
|   end) |   end) | ||||||
|  |  | ||||||
|   if has_clipboard() then |   if has_clipboard() then | ||||||
|   | |||||||
| @@ -41,7 +41,7 @@ describe('tui', function() | |||||||
|       -- INSERT --                                      | |       -- INSERT --                                      | | ||||||
|       -- TERMINAL --                                    | |       -- TERMINAL --                                    | | ||||||
|     ]]) |     ]]) | ||||||
|     feed('\x1b') |     feed('\027') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       abc                                               | |       abc                                               | | ||||||
|       test1                                             | |       test1                                             | | ||||||
| @@ -57,7 +57,7 @@ describe('tui', function() | |||||||
|     local keys = 'dfghjkl' |     local keys = 'dfghjkl' | ||||||
|     for c in keys:gmatch('.') do |     for c in keys:gmatch('.') do | ||||||
|       execute('nnoremap <a-'..c..'> ialt-'..c..'<cr><esc>') |       execute('nnoremap <a-'..c..'> ialt-'..c..'<cr><esc>') | ||||||
|       feed('\x1b'..c) |       feed('\027'..c) | ||||||
|     end |     end | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       alt-j                                             | |       alt-j                                             | | ||||||
| @@ -87,7 +87,7 @@ describe('tui', function() | |||||||
|     -- Example: for input ALT+j: |     -- Example: for input ALT+j: | ||||||
|     --    * Vim (Nvim prior to #3982) sets high-bit, inserts "ê". |     --    * Vim (Nvim prior to #3982) sets high-bit, inserts "ê". | ||||||
|     --    * Nvim (after #3982) inserts "j". |     --    * Nvim (after #3982) inserts "j". | ||||||
|     feed('i\x1bj') |     feed('i\027j') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       j{1: }                                                | |       j{1: }                                                | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -101,9 +101,9 @@ describe('tui', function() | |||||||
|  |  | ||||||
|   it('accepts ascii control sequences', function() |   it('accepts ascii control sequences', function() | ||||||
|     feed('i') |     feed('i') | ||||||
|     feed('\x16\x07') -- ctrl+g |     feed('\022\007') -- ctrl+g | ||||||
|     feed('\x16\x16') -- ctrl+v |     feed('\022\022') -- ctrl+v | ||||||
|     feed('\x16\x0d') -- ctrl+m |     feed('\022\013') -- ctrl+m | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|     {3:^G^V^M}{1: }                                           | |     {3:^G^V^M}{1: }                                           | | ||||||
|     ~                                                 | |     ~                                                 | | ||||||
| @@ -116,7 +116,7 @@ describe('tui', function() | |||||||
|   end) |   end) | ||||||
|  |  | ||||||
|   it('automatically sends <Paste> for bracketed paste sequences', function() |   it('automatically sends <Paste> for bracketed paste sequences', function() | ||||||
|     feed('i\x1b[200~') |     feed('i\027[200~') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       {1: }                                                 | |       {1: }                                                 | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -136,7 +136,7 @@ describe('tui', function() | |||||||
|       -- INSERT (paste) --                              | |       -- INSERT (paste) --                              | | ||||||
|       -- TERMINAL --                                    | |       -- TERMINAL --                                    | | ||||||
|     ]]) |     ]]) | ||||||
|     feed('\x1b[201~') |     feed('\027[201~') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       pasted from terminal{1: }                             | |       pasted from terminal{1: }                             | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -154,9 +154,9 @@ describe('tui', function() | |||||||
|     for i = 1, 3000 do |     for i = 1, 3000 do | ||||||
|       t[i] = 'item ' .. tostring(i) |       t[i] = 'item ' .. tostring(i) | ||||||
|     end |     end | ||||||
|     feed('i\x1b[200~') |     feed('i\027[200~') | ||||||
|     feed(table.concat(t, '\n')) |     feed(table.concat(t, '\n')) | ||||||
|     feed('\x1b[201~') |     feed('\027[201~') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       item 2997                                         | |       item 2997                                         | | ||||||
|       item 2998                                         | |       item 2998                                         | | ||||||
| @@ -204,7 +204,7 @@ describe('tui focus event handling', function() | |||||||
|   end) |   end) | ||||||
|  |  | ||||||
|   it('can handle focus events in normal mode', function() |   it('can handle focus events in normal mode', function() | ||||||
|     feed('\x1b[I') |     feed('\027[I') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       {1: }                                                 | |       {1: }                                                 | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -215,7 +215,7 @@ describe('tui focus event handling', function() | |||||||
|       -- TERMINAL --                                    | |       -- TERMINAL --                                    | | ||||||
|     ]]) |     ]]) | ||||||
|  |  | ||||||
|     feed('\x1b[O') |     feed('\027[O') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       {1: }                                                 | |       {1: }                                                 | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -230,7 +230,7 @@ describe('tui focus event handling', function() | |||||||
|   it('can handle focus events in insert mode', function() |   it('can handle focus events in insert mode', function() | ||||||
|     execute('set noshowmode') |     execute('set noshowmode') | ||||||
|     feed('i') |     feed('i') | ||||||
|     feed('\x1b[I') |     feed('\027[I') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       {1: }                                                 | |       {1: }                                                 | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -240,7 +240,7 @@ describe('tui focus event handling', function() | |||||||
|       gained                                            | |       gained                                            | | ||||||
|       -- TERMINAL --                                    | |       -- TERMINAL --                                    | | ||||||
|     ]]) |     ]]) | ||||||
|     feed('\x1b[O') |     feed('\027[O') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       {1: }                                                 | |       {1: }                                                 | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -254,7 +254,7 @@ describe('tui focus event handling', function() | |||||||
|  |  | ||||||
|   it('can handle focus events in cmdline mode', function() |   it('can handle focus events in cmdline mode', function() | ||||||
|     feed(':') |     feed(':') | ||||||
|     feed('\x1b[I') |     feed('\027[I') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|                                                         | |                                                         | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -264,7 +264,7 @@ describe('tui focus event handling', function() | |||||||
|       g{1:a}ined                                            | |       g{1:a}ined                                            | | ||||||
|       -- TERMINAL --                                    | |       -- TERMINAL --                                    | | ||||||
|     ]]) |     ]]) | ||||||
|     feed('\x1b[O') |     feed('\027[O') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|                                                         | |                                                         | | ||||||
|       ~                                                 | |       ~                                                 | | ||||||
| @@ -281,7 +281,7 @@ describe('tui focus event handling', function() | |||||||
|     execute('set laststatus=0') |     execute('set laststatus=0') | ||||||
|     execute('set noshowmode') |     execute('set noshowmode') | ||||||
|     execute('terminal') |     execute('terminal') | ||||||
|     feed('\x1b[I') |     feed('\027[I') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       ready $                                           | |       ready $                                           | | ||||||
|       [Process exited 0]{1: }                               | |       [Process exited 0]{1: }                               | | ||||||
| @@ -291,7 +291,7 @@ describe('tui focus event handling', function() | |||||||
|       gained                                            | |       gained                                            | | ||||||
|       -- TERMINAL --                                    | |       -- TERMINAL --                                    | | ||||||
|     ]]) |     ]]) | ||||||
|    feed('\x1b[O') |    feed('\027[O') | ||||||
|     screen:expect([[ |     screen:expect([[ | ||||||
|       ready $                                           | |       ready $                                           | | ||||||
|       [Process exited 0]{1: }                               | |       [Process exited 0]{1: }                               | | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Thiago de Arruda
					Thiago de Arruda