node-serialport-bindings-cpp/test
Linus Wallgren 090b26b58b Bugfixes around JS handling of file descriptors
This patch combines #586 and #686

 - A closed serialport now uses fd = null
 - Emulate a proper fd in mock hardware
 - Instead of using the device path as the file descriptor, use a generated
integer as the fd.

This have to use a starting fd of 1 as there are bugs when the fd is 0.
The open(2) manpage states that the file descriptor will be a small
nonnegative integer.

Checking if the fd is falsey leads to the incorrect classification of the
fd 0 as invalid. That is not the case, open(2) specifies the fd as "a
small, nonnegative integer".

This also adds tests for all the cases where the fd was previously
incorrectly considered invalid, which required adding three more methods
to the mock-hardware (update, set and drain).

This solves issue #472
2016-03-28 19:41:34 -04:00
..
parsers.js Switch to eslint and fixup a lot of listing issues. 2016-03-27 15:03:15 -04:00
serialport-basic.js Bugfixes around JS handling of file descriptors 2016-03-28 19:41:34 -04:00
serialport-c.js Switch to eslint and fixup a lot of listing issues. 2016-03-27 15:03:15 -04:00