aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/shada_spec.lua
diff options
context:
space:
mode:
authorAdnoC <adam.r.cutler@gmail.com>2017-05-29 11:34:08 -0400
committerAdnoC <adam.r.cutler@gmail.com>2017-05-31 13:31:05 -0400
commit5908f562dfe9dfcbf1218b2820addff117ee4847 (patch)
tree6fb03c07e6d033faf853e9a0e6a0c5611bc52e96 /test/functional/plugin/shada_spec.lua
parent0c3dea5c4d86a8ef61363034877bde04a0e99463 (diff)
downloadrneovim-5908f562dfe9dfcbf1218b2820addff117ee4847.tar.gz
rneovim-5908f562dfe9dfcbf1218b2820addff117ee4847.tar.bz2
rneovim-5908f562dfe9dfcbf1218b2820addff117ee4847.zip
test: Fix and add cases for unnamed register
Also: Add ru to shada tests with all keys Add test for unset unnamed and register 0
Diffstat (limited to 'test/functional/plugin/shada_spec.lua')
-rw-r--r--test/functional/plugin/shada_spec.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/functional/plugin/shada_spec.lua b/test/functional/plugin/shada_spec.lua
index bf37fbabc5..639833071b 100644
--- a/test/functional/plugin/shada_spec.lua
+++ b/test/functional/plugin/shada_spec.lua
@@ -179,6 +179,7 @@ describe('In autoload/shada.vim', function()
' + n name \'@\'',
' + rc contents ["abc", "def"]',
' + rt type CHARACTERWISE',
+ ' + ru is_unnamed FALSE',
' + rw block width 10',
' + sb search backward TRUE',
' + sc smartcase value FALSE',
@@ -204,6 +205,7 @@ describe('In autoload/shada.vim', function()
'rt': 0,
'rw': 10,
'rc': ['abc', 'def'],
+ 'ru': {'_TYPE': v:msgpack_types.boolean, '_VAL': 0},
'n': 0x40,
'l': 10,
'c': 0,
@@ -226,6 +228,8 @@ describe('In autoload/shada.vim', function()
.. '0 (CHARACTERWISE), 1 (LINEWISE), 2 (BLOCKWISE)',
' + rt type 10',
' # Expected boolean',
+ ' + ru is_unnamed 10',
+ ' # Expected boolean',
' + sc smartcase value NIL',
' # Expected boolean',
' + sm magic value "TRUE"',
@@ -240,6 +244,7 @@ describe('In autoload/shada.vim', function()
'sp': {'_TYPE': v:msgpack_types.string, '_VAL': ["abc"]},
'rt': 10,
'rc': '10',
+ 'ru': 10,
'n': -0x40,
'l': -10,
'c': 'abc',
@@ -720,12 +725,14 @@ describe('In autoload/shada.vim', function()
' # Expected integer',
' + rw block width ""',
' + rt type BLOCKWISE',
- ' + ru is_unnamed FALSE',
+ ' # Expected boolean',
+ ' + ru is_unnamed ""',
}, ([[ [{'type': 5, 'timestamp': 0, 'data': {
'n': 0x20,
'rc': ['abcdefghijklmnopqrstuvwxyz', 'abcdefghijklmnopqrstuvwxyz'],
'rw': "",
'rt': 2,
+ 'ru': ""
}}] ]]):gsub('\n', ''))
sd2strings_eq({
'Register with timestamp ' .. epoch .. ':',
@@ -738,12 +745,14 @@ describe('In autoload/shada.vim', function()
' # Unexpected enum value: expected one of 0 (CHARACTERWISE), '
.. '1 (LINEWISE), 2 (BLOCKWISE)',
' + rt type 10',
- ' + ru is_unnamed FALSE',
+ ' # Expected boolean',
+ ' + ru is_unnamed ["abc", "def"]',
}, ([[ [{'type': 5, 'timestamp': 0, 'data': {
'n': 0x20,
'rc': 0,
'rw': -1,
'rt': 10,
+ 'ru': ['abc', 'def'],
}}] ]]):gsub('\n', ''))
sd2strings_eq({
'Register with timestamp ' .. epoch .. ':',