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: skip test-icu-transcode if ICU is not present #10707

Closed
wants to merge 1 commit into from

Conversation

watilde
Copy link
Member

@watilde watilde commented Jan 9, 2017

Fixes #9511. Use icu's punycode implementation to make sure ICU is present or not in a test.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
  • test

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jan 9, 2017
const buffer = require('buffer');
const assert = require('assert');
const icu = getPunycode();
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO I think it would be better to have the skip up here instead. Also, there is already a common.hasIntl that we should be able to re-use:

// ...
const assert = require('assert');

if (!common.hasIntl) {
  common.skip('missing intl... skipping test');
  return;
}

// ...

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your comment! I've updated it.

@mscdex mscdex added the i18n-api Issues and PRs related to the i18n implementation. label Jan 9, 2017
use common.hasIntl to make sure
Intl object is present or not.

PR-URL:
@italoacasas
Copy link
Contributor

const buffer = require('buffer');
const assert = require('assert');

if (!common.hasIntl) {
Copy link
Member

@srl295 srl295 Jan 16, 2017

Choose a reason for hiding this comment

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

we should use this for other test cases. 👍
This way we can easily find the test cases that are Intl dependent.

jasnell pushed a commit that referenced this pull request Jan 16, 2017
use common.hasIntl to make sure Intl object is present or not.

PR-URL: #10707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
@jasnell
Copy link
Member

jasnell commented Jan 16, 2017

Landed in a0e13da

@jasnell jasnell closed this Jan 16, 2017
@watilde watilde deleted the feature/fixes-9511 branch January 16, 2017 18:20
watilde added a commit to watilde/node that referenced this pull request Jan 16, 2017
We should use `common.hasIntl` in tests for test cases which are related to ICU.
This way we can easily find the test cases that are Intl dependent.
Plus, it will be able to make the tests a little faster if we check hasIntl first.

Also, this tweaks the log messages to unify the message.

Refs: nodejs#10707
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
use common.hasIntl to make sure Intl object is present or not.

PR-URL: nodejs#10707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
lpinca pushed a commit that referenced this pull request Jan 19, 2017
We should use `common.hasIntl` in tests for test cases which are
related to ICU.
This way we can easily find the test cases that are Intl dependent.
Plus, it will be able to make the tests a little faster if we check
hasIntl first.

Also, this tweaks the log messages to unify the message.

Refs: #10707
PR-URL: #10841
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 23, 2017
use common.hasIntl to make sure Intl object is present or not.

PR-URL: nodejs#10707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
use common.hasIntl to make sure Intl object is present or not.

PR-URL: nodejs#10707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
We should use `common.hasIntl` in tests for test cases which are
related to ICU.
This way we can easily find the test cases that are Intl dependent.
Plus, it will be able to make the tests a little faster if we check
hasIntl first.

Also, this tweaks the log messages to unify the message.

Refs: nodejs#10707
PR-URL: nodejs#10841
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
use common.hasIntl to make sure Intl object is present or not.

PR-URL: nodejs#10707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
We should use `common.hasIntl` in tests for test cases which are
related to ICU.
This way we can easily find the test cases that are Intl dependent.
Plus, it will be able to make the tests a little faster if we check
hasIntl first.

Also, this tweaks the log messages to unify the message.

Refs: nodejs#10707
PR-URL: nodejs#10841
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorins
Copy link
Contributor

This does not land cleanly in LTS. Please feel free to manually backport

@MylesBorins
Copy link
Contributor

ping re: backport

@watilde
Copy link
Member Author

watilde commented May 8, 2017

I just started working on the backport to v6.

watilde added a commit to watilde/node that referenced this pull request May 8, 2017
use common.hasIntl to make sure Intl object is present or not.

PR-URL: nodejs#10707
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
@watilde
Copy link
Member Author

watilde commented May 10, 2017

@MylesBorins I'm going to remove the backport-requested-v6.x label from this PR because of this comment: #12905 (comment). Let me know if I misunderstand it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-api Issues and PRs related to the i18n implementation. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants