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 failure for ISO-2022-JP #15

Closed
pnemade opened this issue Sep 21, 2015 · 1 comment
Closed

test failure for ISO-2022-JP #15

pnemade opened this issue Sep 21, 2015 · 1 comment

Comments

@pnemade
Copy link

pnemade commented Sep 21, 2015

I am packaging this module for Fedora. I have created spec file and trying to build binary rpms. when I run "nodeunit test" on Fedora 23, I get

+ nodeunit test

test
✔ General tests - From UTF-8 to Latin_1
✔ General tests - From Latin_1 to UTF-8
✔ General tests - From UTF-8 to UTF-8
✔ General tests - From Latin_13 to Latin_15
✔ General tests - From Latin_13 to Latin_15 lite
[Error: Encoding not recognized: 'ISO-2022-JP' (searched as: 'iso2022jp')]
✖ General tests - From ISO-2022-JP to UTF-8

AssertionError: <Buffer 1b 24 42 33 58 39 3b 35 3b 3d 51 30 77 38 26 3d 24 38 21 46 24 32 71 4a 73 39 70 1b 28 42> deepEqual <Buffer e5 ad a6 e6 a0 a1 e6 8a 80 e8 a1 93 e5 93 a1 e7 a0 94 e4 bf ae e6 a4 9c e8 a8 8e e4 bc 9a e5 a0 b1 e5 91 8a>
    at Object.deepEqual (/usr/lib/node_modules/nodeunit/lib/types.js:83:39)
    at Object.exports.General tests.From ISO-2022-JP to UTF-8 (/home/parag/rpmbuild/BUILD/encoding-0.1.11/test/test.js:45:14)
    at Object.<anonymous> (/usr/lib/node_modules/nodeunit/lib/core.js:236:16)
    at Object.<anonymous> (/usr/lib/node_modules/nodeunit/lib/core.js:236:16)
    at /usr/lib/node_modules/nodeunit/lib/core.js:236:16
    at Object.exports.runTest (/usr/lib/node_modules/nodeunit/lib/core.js:70:9)
    at /usr/lib/node_modules/nodeunit/lib/core.js:118:25
    at /usr/lib/node_modules/async/lib/async.js:606:13
    at iterate (/usr/lib/node_modules/async/lib/async.js:134:13)
    at /usr/lib/node_modules/async/lib/async.js:145:25
    at /usr/lib/node_modules/async/lib/async.js:608:17
    at /usr/lib/node_modules/nodeunit/lib/types.js:146:17
    at process._tickCallback (node.js:442:13)


FAILURES: 1/6 assertions failed (91ms)
error: Bad exit status from /var/tmp/rpm-tmp.jrphYe (%check)

Any idea how to fix this?

@andris9
Copy link
Owner

andris9 commented Sep 21, 2015

This is undocumented but for the tests to pass you need an additional node module iconv.

npm install iconv && npm test

If you target a specific platform then you can keep the iconv module in the node_modules folder, otherwise it's an optional dependency as it needs compilation and does not work on every platform.

@andris9 andris9 closed this as completed Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants