Skip to content

Commit 6c00ab4

Browse files
authored
tests: auto disable network related tests (#141)
* added .editorconfig to ease contributing to the project * tests: autodisable test in absence of curl When running the test in the nix sandbox, there is no internet access and this specific test fails. The best solution would probably be to download these files only when they dont exist. The current fix skips the test when curl is not available and allows to move on.
1 parent 07f64ac commit 6c00ab4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
tab_width = 8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
10+
[*.{c,h,in,lua}]
11+
max_line_length = 100
12+
13+
[{Makefile,**/Makefile,runtime/doc/*.txt}]
14+
indent_style = tab
15+
indent_size = 8

test/auto/db_spec.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ describe("sqlite.db", function()
546546
end)
547547

548548
describe(":select", function()
549+
if vim.fn.executable("curl") then
550+
pending("'curl' program is not available")
551+
return
552+
end
549553
local db = sql:open(path)
550554
local posts, users
551555

0 commit comments

Comments
 (0)