diff options
author | Thomas Vigouroux <thomas.vigouroux@protonmail.com> | 2023-07-19 17:56:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 16:56:25 +0100 |
commit | 30a5c28c8740d2e07c20cb58822b7d7aa489b728 (patch) | |
tree | 6dced02f6777be52feb94f2dc1d7537a59950500 /test/functional | |
parent | 2f22ed6a00db10c4852a8fa232b8782f8b6a6646 (diff) | |
download | rneovim-30a5c28c8740d2e07c20cb58822b7d7aa489b728.tar.gz rneovim-30a5c28c8740d2e07c20cb58822b7d7aa489b728.tar.bz2 rneovim-30a5c28c8740d2e07c20cb58822b7d7aa489b728.zip |
feat(decoration_provider): log errors as error messages
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index cee1e32114..ef55784ca8 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -37,6 +37,7 @@ describe('decorations providers', function() [15] = {special = Screen.colors.Blue, undercurl = true}, [16] = {special = Screen.colors.Red, undercurl = true}, [17] = {foreground = Screen.colors.Red}, + [18] = {bold = true, foreground = Screen.colors.SeaGreen}; } end) @@ -611,6 +612,27 @@ describe('decorations providers', function() assert(eok == false) ]]) end) + + it('errors gracefully', function() + insert(mulholland) + + setup_provider [[ + function on_do(...) + error "Foo" + end + ]] + + screen:expect{grid=[[ + {2:Error in decoration provider ns1.start:} | + {2:Error executing lua: [string "<nvim>"]:4}| + {2:: Foo} | + {2:stack traceback:} | + {2: [C]: in function 'error'} | + {2: [string "<nvim>"]:4: in function}| + {2: <[string "<nvim>"]:3>} | + {18:Press ENTER or type command to continue}^ | + ]]} + end) end) local example_text = [[ |