aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd/show_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:39:54 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:39:54 +0000
commit21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch)
tree84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /test/functional/autocmd/show_spec.lua
parentd9c904f85a23a496df4eb6be42aa43f007b22d50 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-colorcolchar.tar.gz
rneovim-colorcolchar.tar.bz2
rneovim-colorcolchar.zip
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'test/functional/autocmd/show_spec.lua')
-rw-r--r--test/functional/autocmd/show_spec.lua41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/functional/autocmd/show_spec.lua b/test/functional/autocmd/show_spec.lua
index 505bed834b..9e0a5b819a 100644
--- a/test/functional/autocmd/show_spec.lua
+++ b/test/functional/autocmd/show_spec.lua
@@ -180,4 +180,45 @@ describe(":autocmd", function()
test_3 User
B echo "B3"]]), funcs.execute('autocmd test_3 * B'))
end)
+
+ it('should skip consecutive patterns', function()
+ exec([[
+ autocmd! BufEnter
+ augroup test_1
+ autocmd BufEnter A echo 'A'
+ autocmd BufEnter A echo 'B'
+ autocmd BufEnter A echo 'C'
+ autocmd BufEnter B echo 'D'
+ autocmd BufEnter B echo 'E'
+ autocmd BufEnter B echo 'F'
+ augroup END
+ augroup test_2
+ autocmd BufEnter C echo 'A'
+ autocmd BufEnter C echo 'B'
+ autocmd BufEnter C echo 'C'
+ autocmd BufEnter D echo 'D'
+ autocmd BufEnter D echo 'E'
+ autocmd BufEnter D echo 'F'
+ augroup END
+
+ let g:output = execute('autocmd BufEnter')
+ ]])
+ eq(dedent([[
+
+ --- Autocommands ---
+ test_1 BufEnter
+ A echo 'A'
+ echo 'B'
+ echo 'C'
+ B echo 'D'
+ echo 'E'
+ echo 'F'
+ test_2 BufEnter
+ C echo 'A'
+ echo 'B'
+ echo 'C'
+ D echo 'D'
+ echo 'E'
+ echo 'F']]), eval('g:output'))
+ end)
end)