From bdb7345a28f9b8d3edba46ac0dc5cfbd57cb92e8 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 26 Aug 2024 12:05:01 -0300 Subject: fix: patch: check array indices correctly --- spec/unit/tools_spec.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spec') 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() it("fails if the patch file is invalid", function() write_file("test.patch", invalid_patch1, finally) - local p = patch.read_patch("test.patch") - local result = pcall(patch.apply_patch, p) - assert.falsy(result) + local p, all_ok = patch.read_patch("test.patch") + assert.falsy(all_ok) end) it("returns false if the files from the patch doesn't exist", function() -- cgit v1.2.3-55-g6feb