Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Feb 13, 2024
1 parent f136afa commit 97a81f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/test_filewatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,20 @@ function test_fw:test_2()
fs.rename(root / "file_1", root / "file_2")
fs.remove(root / "file_2")

local function has(t, a)
for _, v in ipairs(t) do
if v == a then
return true
end
end
end
local list = {}
local n = 100
while true do
local w, v = fw:select()
if w then
n = 100
if list[#list] ~= v then
if not has(list, v) and root:string() ~= v then
list[#list+1] = v
end
else
Expand Down

0 comments on commit 97a81f8

Please sign in to comment.