diff options
author | MaleDong <maledong_private@qq.com> | 2018-06-22 19:08:58 +0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-07-08 12:27:16 -0700 |
commit | a478259af7671fa2794aa030f7790a9d9772be5e (patch) | |
tree | 5053f2598e6f5cd51beefd02f90d912be6b37511 /test/parallel/test-internal-util-normalizeencoding.js | |
parent | c18a9d1cb8fe94e39f2826de7edd9c44c9be9ce2 (diff) | |
download | android-node-v8-a478259af7671fa2794aa030f7790a9d9772be5e.tar.gz android-node-v8-a478259af7671fa2794aa030f7790a9d9772be5e.tar.bz2 android-node-v8-a478259af7671fa2794aa030f7790a9d9772be5e.zip |
test,util: add missing tests and conditions
1) Add missing unit tests by `ucs-2` in different kinds of cases.
2) Add missing unit tests by `usc-2` in different kinds of cases.
3) Fix a bug:We cannot find `ucs-2` in `case 5`'s `if` condition after
`toLowerCase()`
PR-URL: https://github.com/nodejs/node/pull/21455
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/parallel/test-internal-util-normalizeencoding.js')
-rw-r--r-- | test/parallel/test-internal-util-normalizeencoding.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/parallel/test-internal-util-normalizeencoding.js b/test/parallel/test-internal-util-normalizeencoding.js index 081255cef0..2f16d55fad 100644 --- a/test/parallel/test-internal-util-normalizeencoding.js +++ b/test/parallel/test-internal-util-normalizeencoding.js @@ -18,10 +18,16 @@ const tests = [ ['utF-8', 'utf8'], ['ucs2', 'utf16le'], ['UCS2', 'utf16le'], + ['ucs-2', 'utf16le'], + ['UCS-2', 'utf16le'], + ['UcS-2', 'utf16le'], ['utf16le', 'utf16le'], ['utf-16le', 'utf16le'], ['UTF-16LE', 'utf16le'], ['UTF16LE', 'utf16le'], + ['usc-2', 'utf16le'], + ['USC-2', 'utf16le'], + ['uSc-2', 'utf16le'], ['binary', 'latin1'], ['BINARY', 'latin1'], ['latin1', 'latin1'], @@ -36,6 +42,7 @@ const tests = [ [NaN, undefined], [0, undefined], [[], undefined], + [{}, undefined] ]; tests.forEach((e, i) => { |