Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/plenary/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ local on_output = function(self, result_key, cb)
cb(err, result_line, self)
end

if data == nil or is_complete then
if is_complete then
return
end

Expand Down
6 changes: 4 additions & 2 deletions tests/plenary/job_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe("Job", function()
assert.are.same(job:result(), results)
end)

pending("should split stdin across newlines with no ending newline", function()
it("should split stdin across newlines with no ending newline", function()
local results = {}
local job = Job:new {
-- writer = "hello\nword\nthis is\ntj",
Expand All @@ -113,6 +113,8 @@ describe("Job", function()
job:start()
job:send "hello\nwor"
job:send "ld"

wait_for_result(job, { "hello", "world" })
job:shutdown()

assert.are.same(job:result(), { "hello", "world" })
Expand All @@ -137,7 +139,7 @@ describe("Job", function()
assert.are.same(job:result(), results)
end)

pending("should return last line when there is no ending newline", function()
it("should return last line when there is no ending newline", function()
local results = {}
local job = Job:new {
command = "printf",
Expand Down