aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-08-26 12:05:01 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-08-27 11:32:08 -0300
commitbdb7345a28f9b8d3edba46ac0dc5cfbd57cb92e8 (patch)
treec7e7cd9b5480fb412c18cd000ec266d368ae2d63 /spec
parentd300c11c6acba4390fdde9030a45b0a31e7501d1 (diff)
downloadluarocks-bdb7345a28f9b8d3edba46ac0dc5cfbd57cb92e8.tar.gz
luarocks-bdb7345a28f9b8d3edba46ac0dc5cfbd57cb92e8.tar.bz2
luarocks-bdb7345a28f9b8d3edba46ac0dc5cfbd57cb92e8.zip
fix: patch: check array indices correctly
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/tools_spec.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/unit/tools_spec.lua b/spec/unit/tools_spec.lua
index 5b85c86a..65d8b73d 100644
--- a/spec/unit/tools_spec.lua
+++ b/spec/unit/tools_spec.lua
@@ -223,9 +223,8 @@ describe("Luarocks patch test #unit", function()
223 223
224 it("fails if the patch file is invalid", function() 224 it("fails if the patch file is invalid", function()
225 write_file("test.patch", invalid_patch1, finally) 225 write_file("test.patch", invalid_patch1, finally)
226 local p = patch.read_patch("test.patch") 226 local p, all_ok = patch.read_patch("test.patch")
227 local result = pcall(patch.apply_patch, p) 227 assert.falsy(all_ok)
228 assert.falsy(result)
229 end) 228 end)
230 229
231 it("returns false if the files from the patch doesn't exist", function() 230 it("returns false if the files from the patch doesn't exist", function()