diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-25 16:22:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 16:22:39 +0800 |
commit | 2efcb1a7e9a3d98c2bdacb769d094e4920149755 (patch) | |
tree | 532dc6005d9f54edd8234a47aff0798103cf3912 /test/functional/legacy/source_spec.lua | |
parent | 7875e1377c24699a3773609996c4e21320a09f31 (diff) | |
parent | 84646b80f3adb14d8e7c052047e2cb30a16b1eca (diff) | |
download | rneovim-2efcb1a7e9a3d98c2bdacb769d094e4920149755.tar.gz rneovim-2efcb1a7e9a3d98c2bdacb769d094e4920149755.tar.bz2 rneovim-2efcb1a7e9a3d98c2bdacb769d094e4920149755.zip |
Merge pull request #21188 from zeertzjq/vim-8.2.2684
vim-patch:8.2.{2684,2713}: fold tests
Diffstat (limited to 'test/functional/legacy/source_spec.lua')
-rw-r--r-- | test/functional/legacy/source_spec.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/functional/legacy/source_spec.lua b/test/functional/legacy/source_spec.lua new file mode 100644 index 0000000000..02e6385247 --- /dev/null +++ b/test/functional/legacy/source_spec.lua @@ -0,0 +1,31 @@ +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear = helpers.clear +local feed = helpers.feed +local write_file = helpers.write_file + +before_each(clear) + +describe(':source!', function() + it('gives E22 when scripts nested too deep', function() + write_file('Xscript.vim', [[ + :source! Xscript.vim + ]]) + local screen = Screen.new(75, 6) + screen:set_default_attr_ids({ + [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [1] = {background = Screen.colors.Red, foreground = Screen.colors.White}, -- ErrorMsg + }) + screen:attach() + feed(':source! Xscript.vim\n') + screen:expect([[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {1:E22: Scripts nested too deep} | + ]]) + os.remove('Xscript.vim') + end) +end) |