Skip to content
Closed
Changes from 1 commit
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
Next Next commit
test: add coverage for utf8CheckIncomplete()
  • Loading branch information
sushi90 committed Feb 16, 2017
commit a20071c00d1bdc32b9d8e7115b109a948f024109
3 changes: 3 additions & 0 deletions test/parallel/test-string-decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ assert.strictEqual(decoder.write(Buffer.from('F1', 'hex')), '');
assert.strictEqual(decoder.write(Buffer.from('41F2', 'hex')), '\ufffdA');
assert.strictEqual(decoder.end(), '\ufffd');

//Additional utf8Text test
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you update the PR with a space after the //?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM. It is done.

decoder = new StringDecoder('utf8');
assert.strictEqual(decoder.text(Buffer.from([0x41, 0x42]), 1), 'B');

// Additional UTF-16LE surrogate pair tests
decoder = new StringDecoder('utf16le');
Expand Down