aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/ctrl_c_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-07-18 19:37:18 +0000
committerJosh Rahm <rahm@google.com>2022-07-18 19:37:18 +0000
commit308e1940dcd64aa6c344c403d4f9e0dda58d9c5c (patch)
tree35fe43e01755e0f312650667004487a44d6b7941 /test/functional/ex_cmds/ctrl_c_spec.lua
parent96a00c7c588b2f38a2424aeeb4ea3581d370bf2d (diff)
parente8c94697bcbe23a5c7b07c292b90a6b70aadfa87 (diff)
downloadrneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.gz
rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.bz2
rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.zip
Merge remote-tracking branch 'upstream/master' into rahm
Diffstat (limited to 'test/functional/ex_cmds/ctrl_c_spec.lua')
-rw-r--r--test/functional/ex_cmds/ctrl_c_spec.lua60
1 files changed, 0 insertions, 60 deletions
diff --git a/test/functional/ex_cmds/ctrl_c_spec.lua b/test/functional/ex_cmds/ctrl_c_spec.lua
deleted file mode 100644
index f65d9f0d01..0000000000
--- a/test/functional/ex_cmds/ctrl_c_spec.lua
+++ /dev/null
@@ -1,60 +0,0 @@
-local helpers = require('test.functional.helpers')(after_each)
-local Screen = require('test.functional.ui.screen')
-local clear, feed, source = helpers.clear, helpers.feed, helpers.source
-local command = helpers.command
-
-describe("CTRL-C (mapped)", function()
- before_each(function()
- clear()
- end)
-
- it("interrupts :global", function()
- -- Crashes luajit.
- if helpers.skip_fragile(pending,
- helpers.isCI('travis') or helpers.isCI('appveyor')) then
- return
- end
-
- source([[
- set nomore nohlsearch undolevels=-1
- nnoremap <C-C> <NOP>
- ]])
-
- command("silent edit! test/functional/fixtures/bigfile.txt")
- local screen = Screen.new(52, 6)
- screen:attach()
- screen:set_default_attr_ids({
- [0] = {foreground = Screen.colors.White,
- background = Screen.colors.Red},
- [1] = {bold = true,
- foreground = Screen.colors.SeaGreen}
- })
-
- screen:expect([[
- ^0000;<control>;Cc;0;BN;;;;;N;NULL;;;; |
- 0001;<control>;Cc;0;BN;;;;;N;START OF HEADING;;;; |
- 0002;<control>;Cc;0;BN;;;;;N;START OF TEXT;;;; |
- 0003;<control>;Cc;0;BN;;;;;N;END OF TEXT;;;; |
- 0004;<control>;Cc;0;BN;;;;;N;END OF TRANSMISSION;;;;|
- |
- ]])
-
- local function test_ctrl_c(ms)
- feed(":global/^/p<CR>")
- screen:sleep(ms)
- feed("<C-C>")
- screen:expect{any="Interrupt"}
- end
-
- -- The test is time-sensitive. Try different sleep values.
- local ms_values = {100, 1000, 10000}
- for i, ms in ipairs(ms_values) do
- if i < #ms_values then
- local status, _ = pcall(test_ctrl_c, ms)
- if status then break end
- else -- Call the last attempt directly.
- test_ctrl_c(ms)
- end
- end
- end)
-end)