From 6c00ab414dc1b69621b145908c582b747f24b46e Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Fri, 17 Jun 2022 14:57:13 +0200 Subject: [PATCH] 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. --- .editorconfig | 15 +++++++++++++++ test/auto/db_spec.lua | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..2aa956b1 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/test/auto/db_spec.lua b/test/auto/db_spec.lua index 8cca40b6..5a17a911 100644 --- a/test/auto/db_spec.lua +++ b/test/auto/db_spec.lua @@ -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