summaryrefslogtreecommitdiff
path: root/test/test-gall.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-gall.lua')
-rw-r--r--test/test-gall.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test-gall.lua b/test/test-gall.lua
index 2803751..636339a 100644
--- a/test/test-gall.lua
+++ b/test/test-gall.lua
@@ -53,9 +53,11 @@ end
function suite.test_that_git2_present_if_wanted()
local want_git2 = not(os.getenv "GALL_DISABLE_GIT2")
- local have_git2 = io.open("lib/gall/ll/git2.so", "r") ~= nil
- if want_git2 and have_git2 then
- assert(gall.ll.git2)
+ local have_git2 = pcall(require, "gall.ll.git2")
+ if want_git2 then
+ if have_git2 then
+ assert(gall.ll.git2)
+ end
else
assert(not gall.ll.git2)
end