Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ internal struct _FileManagerImpl {
return false
}
}
if readBytes < -1 { return false }
if readBytes < 0 { return false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a unit test that could be added to validate this behavior to confirm that the change works as intended and it doesn't regress in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How am I supposed to make a unit test that causes read, an OS syscall, to fail reliably?

return true
}
}
Expand Down