aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-08-17 11:09:42 +0200
committerGitHub <noreply@github.com>2016-08-17 11:09:42 +0200
commit6b48d25cbf053720a128bfc124d2ee211addcf5c (patch)
tree0a61a99bc1def8e4cce1eed17be833427bf7bc0a /test
parentc9b29d3884c380d8de51eb163bbc03cf79a5f886 (diff)
parent57ac9b093465077f691359909c795c0259dec7ba (diff)
downloadrneovim-6b48d25cbf053720a128bfc124d2ee211addcf5c.tar.gz
rneovim-6b48d25cbf053720a128bfc124d2ee211addcf5c.tar.bz2
rneovim-6b48d25cbf053720a128bfc124d2ee211addcf5c.zip
Merge pull request #5228 from bfredl/nullbufhl
api: handle null string in buffer_add_highlight
Diffstat (limited to 'test')
-rw-r--r--test/functional/ui/bufhl_spec.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua
index a8006e1ac6..80d413a455 100644
--- a/test/functional/ui/bufhl_spec.lua
+++ b/test/functional/ui/bufhl_spec.lua
@@ -111,12 +111,16 @@ describe('Buffer highlighting', function()
add_hl(id1, "ImportantWord", 2, 0, 9)
add_hl(id1, "ImportantWord", 3, 5, 14)
- id2 = add_hl(0, "Special", 0, 2, 8)
+ -- add_highlight can be called like this to get a new source
+ -- without adding any highlight
+ id2 = add_hl(0, "", 0, 0, 0)
+ neq(id1, id2)
+
+ add_hl(id2, "Special", 0, 2, 8)
add_hl(id2, "Identifier", 1, 3, 8)
add_hl(id2, "Special", 1, 14, 20)
add_hl(id2, "Underlined", 2, 6, 12)
add_hl(id2, "Underlined", 3, 0, 9)
- neq(id1, id2)
screen:expect([[
a {5:longer} example |