Unit Tests

- Added tw-1359.t
Unit Tests

- Improved test by checking error codes.
Unit Tests

- Added tw-1377.t from Jira (thanks to Renato Alves).
Unit Tests

- Added tw-268.t