From eca163375d18d1febc7b9d1e6e7b4295dba447c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Harnes?= Date: Fri, 1 Mar 2024 17:27:07 +0100 Subject: [PATCH] test: add tests for incomptabile os --- tests/clipboard_spec.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/clipboard_spec.lua b/tests/clipboard_spec.lua index bd967e0..8fe9854 100644 --- a/tests/clipboard_spec.lua +++ b/tests/clipboard_spec.lua @@ -11,6 +11,25 @@ describe("clipboard", function() end end) + -- incompatible os + describe("Incompatible", function() + before_each(function() + os.getenv = function() + return false + end + util.has = function() + return false + end + util.executable = function() + return false + end + end) + + it("return nil if clipboard command cant be found", function() + assert.equals(nil, clipboard.get_clip_cmd()) + end) + end) + -- X11 describe("x11", function() before_each(function()