Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: test isFullWidthCodePoint with invalid input #7422

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Jun 25, 2016

Checklist
  • make -j4 test (UNIX) or vcbuild test nosign (Windows) passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

test readline

Description of change

Code coverage information shows that we are only testing the happy path
for the internal readlind isFullWidthCodePoint() function. Test it
with invalid input.

@Trott Trott added readline Issues and PRs related to the built-in readline module. test Issues and PRs related to the tests. labels Jun 25, 2016
@addaleax
Copy link
Member

There’s a typo (readlind) in the commit message, but other than that LGTM.

@Trott
Copy link
Member Author

Trott commented Jun 25, 2016

Typo fixed, thanks!

@mscdex
Copy link
Contributor

mscdex commented Jun 25, 2016

LGTM if CI is happy: https://ci.nodejs.org/job/node-test-pull-request/3084/

@@ -327,6 +327,9 @@ function isWarned(emitter) {
rli.close();
}

// isFullWidthCodePoint() should return false for non-numeric values
assert.strictEqual(internalReadline.isFullWidthCodePoint('あ'), false);
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps you can extend this to [true, false, null, undefined, {}, [], 'あ'].forEach((v) => {?

@bnoordhuis
Copy link
Member

LGTM with a suggestion.

@jasnell
Copy link
Member

jasnell commented Jun 27, 2016

LGTM with @bnoordhuis' suggestion

Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.
@Trott
Copy link
Member Author

Trott commented Jun 28, 2016

Added the additional primitives to check per @bnoordhuis.

New CI: https://ci.nodejs.org/job/node-test-pull-request/3101/

@Trott
Copy link
Member Author

Trott commented Jun 28, 2016

One Raspberry Pi build on CI didn't complete, but otherwise, CI looks good.

@bnoordhuis
Copy link
Member

LGTM

Trott added a commit to Trott/io.js that referenced this pull request Jun 29, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: nodejs#7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott
Copy link
Member Author

Trott commented Jun 29, 2016

Landed in bbf3838

@Trott Trott closed this Jun 29, 2016
Fishrock123 pushed a commit that referenced this pull request Jul 5, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Fishrock123 Fishrock123 mentioned this pull request Jul 5, 2016
@MylesBorins
Copy link
Contributor

appears to be using api's not in v4. Please correct me if wrong

@cjihrig
Copy link
Contributor

cjihrig commented Jul 12, 2016

isFullWidthCodePoint() is in v4. It was in the public readline module before being made internal.

MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor

thanks for the heads up @cjihrig backported in 8a20c14

MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.

PR-URL: #7422
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott Trott deleted the widefalse branch January 13, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
readline Issues and PRs related to the built-in readline module. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants