| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2641cd4 commit aa8771f
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,11 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - | ||
| 3 | 2 | const common = require('../common'); | |
| 3 | + | ||
| 4 | + if (!common.hasIntl) { | ||
| 5 | + common.skip('missing Intl'); | ||
| 6 | + return; | ||
| 7 | + } | ||
| 8 | + | ||
| 4 | 9 | const icu = getPunycode(); | |
| 5 | 10 | const assert = require('assert'); | |
| 6 | 11 | ||
@@ -12,11 +17,6 @@ function getPunycode() { | |||
| 12 | 17 | } | |
| 13 | 18 | } | |
| 14 | 19 | ||
| 15 | - if (!icu) { | ||
| 16 | - common.skip('icu punycode tests because ICU is not present.'); | ||
| 17 | - return; | ||
| 18 | - } | ||
| 19 | - | ||
| 20 | 20 | // Credit for list: http://www.i18nguy.com/markup/idna-examples.html | |
| 21 | 21 | const tests = [ | |
| 22 | 22 | 'افغانستا.icom.museum', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,15 +1,15 @@ | |||
| 1 | 1 | // Flags: --expose_internals | |
| 2 | 2 | 'use strict'; | |
| 3 | - | ||
| 4 | 3 | const common = require('../common'); | |
| 5 | - const assert = require('assert'); | ||
| 6 | - const readline = require('internal/readline'); | ||
| 7 | 4 | ||
| 8 | - if (!process.binding('config').hasIntl) { | ||
| 9 | - common.skip('missing intl... skipping test'); | ||
| 5 | + if (!common.hasIntl) { | ||
| 6 | + common.skip('missing Intl'); | ||
| 10 | 7 | return; | |
| 11 | 8 | } | |
| 12 | 9 | ||
| 10 | + const assert = require('assert'); | ||
| 11 | + const readline = require('internal/readline'); | ||
| 12 | + | ||
| 13 | 13 | // Test column width | |
| 14 | 14 | assert.strictEqual(readline.getStringWidth('a'), 1); | |
| 15 | 15 | assert.strictEqual(readline.getStringWidth('丁'), 2); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,14 +1,14 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | 3 | const common = require('../common'); | |
| 4 | - const buffer = require('buffer'); | ||
| 5 | - const assert = require('assert'); | ||
| 6 | 4 | ||
| 7 | 5 | if (!common.hasIntl) { | |
| 8 | - common.skip('icu punycode tests because ICU is not present.'); | ||
| 6 | + common.skip('missing Intl'); | ||
| 9 | 7 | return; | |
| 10 | 8 | } | |
| 11 | 9 | ||
| 10 | + const buffer = require('buffer'); | ||
| 11 | + const assert = require('assert'); | ||
| 12 | 12 | const orig = Buffer.from('tést €', 'utf8'); | |
| 13 | 13 | ||
| 14 | 14 | // Test Transcoding | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,11 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | const common = require('../common'); | |
| 3 | - const assert = require('assert'); | ||
| 4 | 3 | ||
| 5 | 4 | if (!common.hasIntl || Intl.v8BreakIterator === undefined) { | |
| 6 | - return common.skip('no Intl'); | ||
| 5 | + return common.skip('missing Intl'); | ||
| 7 | 6 | } | |
| 8 | 7 | ||
| 8 | + const assert = require('assert'); | ||
| 9 | 9 | const warning = 'Intl.v8BreakIterator is deprecated and will be removed soon.'; | |
| 10 | 10 | common.expectWarning('DeprecationWarning', warning); | |
| 11 | 11 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ const common = require('../common'); | |||
| 4 | 4 | ||
| 5 | 5 | if (!common.hasIntl) { | |
| 6 | 6 | // A handful of the tests fail when ICU is not included. | |
| 7 | - common.skip('missing Intl... skipping test'); | ||
| 7 | + common.skip('missing Intl'); | ||
| 8 | 8 | return; | |
| 9 | 9 | } | |
| 10 | 10 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ const common = require('../common'); | |||
| 4 | 4 | ||
| 5 | 5 | if (!common.hasIntl) { | |
| 6 | 6 | // A handful of the tests fail when ICU is not included. | |
| 7 | - common.skip('missing Intl... skipping test'); | ||
| 7 | + common.skip('missing Intl'); | ||
| 8 | 8 | return; | |
| 9 | 9 | } | |
| 10 | 10 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments