aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/sign_spec.lua
diff options
context:
space:
mode:
authorFelipe Morales <hel.sheep@gmail.com>2015-01-27 00:56:03 -0300
committerJustin M. Keyes <justinkz@gmail.com>2015-02-13 14:56:43 -0500
commit6e992876ea043fe7fe748d5da5e3b511b60d06a5 (patch)
tree5c63f4b8bc44b116c41c80dae98a7fa81eb356f9 /test/functional/ui/sign_spec.lua
parent2d22e1f035ee5ae165f636ad7550fbd83013af71 (diff)
downloadrneovim-6e992876ea043fe7fe748d5da5e3b511b60d06a5.tar.gz
rneovim-6e992876ea043fe7fe748d5da5e3b511b60d06a5.tar.bz2
rneovim-6e992876ea043fe7fe748d5da5e3b511b60d06a5.zip
shadow previously set signs #1893
Diffstat (limited to 'test/functional/ui/sign_spec.lua')
-rw-r--r--test/functional/ui/sign_spec.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua
new file mode 100644
index 0000000000..a7a4172440
--- /dev/null
+++ b/test/functional/ui/sign_spec.lua
@@ -0,0 +1,45 @@
+local helpers = require('test.functional.helpers')
+local Screen = require('test.functional.ui.screen')
+local clear, feed, execute = helpers.clear, helpers.feed, helpers.execute
+
+describe('Signs', function()
+ local screen
+
+ before_each(function()
+ clear()
+ screen = Screen.new()
+ screen:attach()
+ screen:set_default_attr_ignore( {{}, {bold=true, foreground=255}} )
+ end)
+
+ after_each(function()
+ screen:detach()
+ end)
+
+ describe(':sign place', function()
+ it('shadows previously placed signs', function()
+ feed('ia<cr>b<cr>c<cr><esc>')
+ execute('sign define piet text=>> texthl=Search')
+ execute('sign define pietx text=>! texthl=Search')
+ execute('sign place 1 line=1 name=piet buffer=1')
+ execute('sign place 2 line=3 name=piet buffer=1')
+ execute('sign place 3 line=1 name=pietx buffer=1')
+ screen:expect([[
+ >!a |
+ b |
+ >>c |
+ ^ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ :sign place 3 line=1 name=pietx buffer=1 |
+ ]])
+ end)
+ end)
+end)