Skip to content

Commit

Permalink
tests: fix accidentally re-used variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondill committed Jul 2, 2024
1 parent 3aba4b8 commit ef7d90a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test-spawn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ end

local spawns_done = 0
local async_spawns_done = 0
local io_spawns_done = 0
local exit_yay, exit_snd = nil, nil

-- * Using spawn with array is already covered by the test client.
Expand Down Expand Up @@ -175,7 +176,7 @@ local steps = {
assert(not read_line)
read_line = true
assert(line == "/dev/null", line)
spawns_done = spawns_done + 1
io_spawns_done = io_spawns_done + 1
end, nil, true)
end

Expand All @@ -193,7 +194,7 @@ local steps = {
assert(not read_line)
read_line = true
assert(line == test_stdin, line)
spawns_done = spawns_done + 1
io_spawns_done = io_spawns_done + 1
end, nil, true)
end

Expand All @@ -219,11 +220,11 @@ local steps = {
assert(not read_line)
read_line = true
assert(line:find("^pipe:%[[0-9]+%]$"), line)
spawns_done = spawns_done + 1
io_spawns_done = io_spawns_done + 1
end, nil, true)
end
end
if spawns_done == 3 then
if io_spawns_done == 3 then
return true
end
end,
Expand Down

0 comments on commit ef7d90a

Please sign in to comment.