Skip to content

Commit

Permalink
tests: auto disable network related tests (#141)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
teto authored Jun 17, 2022
1 parent 07f64ac commit 6c00ab4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 8
end_of_line = lf
insert_final_newline = true

[*.{c,h,in,lua}]
max_line_length = 100

[{Makefile,**/Makefile,runtime/doc/*.txt}]
indent_style = tab
indent_size = 8
4 changes: 4 additions & 0 deletions test/auto/db_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,10 @@ describe("sqlite.db", function()
end)

describe(":select", function()
if vim.fn.executable("curl") then
pending("'curl' program is not available")
return
end
local db = sql:open(path)
local posts, users

Expand Down

0 comments on commit 6c00ab4

Please sign in to comment.