Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

[Task] Implement prototype to run Intl/test262 in nodejs/iojs #15

Open
caridy opened this issue Aug 11, 2015 · 9 comments
Open

[Task] Implement prototype to run Intl/test262 in nodejs/iojs #15

caridy opened this issue Aug 11, 2015 · 9 comments
Labels

Comments

@caridy
Copy link
Contributor

caridy commented Aug 11, 2015

E.g.: https://github.com/andyearnshaw/Intl.js/blob/master/Gruntfile.js#L107-L113

@caridy
Copy link
Contributor Author

caridy commented Aug 12, 2015

Some preliminary hacks to run test262 against node v0.12.7, here is the result:

11.1.1_1
11.1.1_15
11.1.1_17
11.1.1_19
11.1.1_20_c -- FAILED 11.1.1_20_c
        throw new Error("Didn't get correct minimumFractionDigits for currency
              ^
Didn't get correct minimumFractionDigits for currency AED; expected 2, got 0.
11.1.1_21
11.1.1_32
11.1.1_34
11.1.1_6
11.1.1_7
11.1.1_a -- FAILED 11.1.1_a
            throw new Error("RegExp has unexpected property " + property + " w
                  ^
RegExp has unexpected property $_ with value de-DE-u-nu-latn.
11.1.2.1_4 -- FAILED 11.1.2.1_4
    if (Intl.NumberFormat.prototype.format.call(format, 12.3456) !== r
                                           ^
Method format called on a non-object or on a wrong type of object.
11.1.2
11.1.3
11.1_L15
11.2.1
11.2.2_L15
11.2.2_a
11.2.3_b
11.3.1
11.3.2_1_a_L15
11.3.2_1_a_ii
11.3.2_1_c
11.3.2_FN_1
11.3.2_FN_2
11.3.2_FN_3_b
11.3.2_FN_3_e
11.3.2_L15
11.3.2_TRF
11.3.2_TRP
11.3.3
11.3.3_L15
11.3_L15
11.3_a -- FAILED 11.3_a
if (typeof Intl.NumberFormat.prototype.format(0) !== "string") {
                                              ^
Method format called on a non-object or on a wrong type of object.
11.3_b
11.4_a
12.1.1_1
12.1.1_18
12.1.1_22
12.1.1_23
12.1.1_25
12.1.1_5
12.1.1_6
12.1.1_TDTO
12.1.1_a -- FAILED 12.1.1_a
            throw new Error("RegExp has unexpected property " + property + " w
                  ^
RegExp has unexpected property $_ with value de-DE-u-ca-gregory.
12.1.2.1_4 -- FAILED 12.1.2.1_4
    if (Intl.DateTimeFormat.prototype.format.call(format, new Date(111
                                             ^
Method format called on a non-object or on a wrong type of object.
12.1.2
12.1.3
12.1_L15
12.2.1
12.2.2_L15
12.2.2_a
12.2.3_b
12.2.3_c
12.3.1
12.3.2_1_a_L15
12.3.2_1_c
12.3.2_FDT_1
12.3.2_FDT_7_a_iv -- FAILED 12.3.2_FDT_7_a_iv
        throw new Error("Formatted year doesn't contain expected year – expect
              ^
Formatted year doesn't contain expected year – expected 271822, got November 271817.
12.3.2_L15
12.3.2_TLT_2
12.3.3 -- FAILED 12.3.3
        throw new Error("Property value " + value + " is not allowed for prope
              ^
Property value America/New_York is not allowed for property timeZone.
12.3.3_L15
12.3_L15
12.3_a -- FAILED 12.3_a
if (typeof Intl.DateTimeFormat.prototype.format(0) !== "string") {
                                                ^
Method format called on a non-object or on a wrong type of object.
12.3_b
12.4_a
13.2.1_1
13.2.1_4_1
13.2.1_4_2
13.2.1_5
13.2.1_L15
13.3.0_1
13.3.0_2
13.3.0_6_1
13.3.0_6_2
13.3.0_7
13.3.1_L15
13.3.2_L15
13.3.3_L15
6.2.2_a
6.2.2_b
6.2.2_c
6.2.3
6.2.4
6.3.1_a
6.3.1_b
6.4_a
6.4_b
6.4_c
8.0
9.1_a
9.1_b
9.2.1_1
9.2.1_3
9.2.1_4
9.2.1_8_c_ii
9.2.1_8_c_vi
9.2.2
9.2.3_5
9.2.5_6
9.2.6_4
9.2.6_4_b
9.2.6_4_c
9.2.8_1_c
9.2.8_4
total 106 -- passed 97 -- failed 9

Note: tests were run again a clean installation of node using NVM, I suspect that due to the missing locales some tests that are relying on de are failing.

@srl295
Copy link
Member

srl295 commented Aug 12, 2015

@caridy thanks!
Can you put in the full data with:

@caridy
Copy link
Contributor Author

caridy commented Aug 12, 2015

@srl295 I tried that before, but I'm getting Segmentation Fail: 11 for some reason. There is the full blob:

$ node --icu-data-dir=~/Downloads/icu/source/data/in/icudt54l.dat noderunner.js
Segmentation fault: 11

When running node console, it works just fine:

$ node --icu-data-dir=~/Downloads/icu/source/data/in/icudt54l.dat
> Intl
{}

@srl295
Copy link
Member

srl295 commented Aug 12, 2015

@caridy try not using the ~ but a full path. The crash is a v8 bug with an issue assigned to me to workaround/float a patch here. In later v8s it should be error-and-abort.

@caridy
Copy link
Contributor Author

caridy commented Aug 12, 2015

Ok, that works a little bit better, but still getting Bus error: 10 at some point, here is the blob:

$ node --icu-data-dir=/Users/caridy/Downloads/icu/source/data/in/icudt54l.dat noderunner.js
11.1.1_1
11.1.1_15
11.1.1_17
11.1.1_19
11.1.1_20_c -- FAILED 11.1.1_20_c
        throw new Error("Didn't get correct minimumFractionDigits for currency
              ^
Didn't get correct minimumFractionDigits for currency AED; expected 2, got 0.
11.1.1_21
11.1.1_32
11.1.1_34
11.1.1_6
11.1.1_7
11.1.1_a -- FAILED 11.1.1_a
            throw new Error("RegExp has unexpected property " + property + " w
                  ^
RegExp has unexpected property $1 with value -latn.
11.1.2.1_4 -- FAILED 11.1.2.1_4
    if (Intl.NumberFormat.prototype.format.call(format, 12.3456) !== r
                                           ^
Method format called on a non-object or on a wrong type of object.
11.1.2
11.1.3
11.1_L15
11.2.1
11.2.2_L15
11.2.2_a
11.2.3_b -- FAILED 11.2.3_b
                throw new Error("Locale " + options.locale + " is affected by
                      ^
Locale ja-JP-u-nu-native is affected by key nu; value native.
11.3.1
11.3.2_1_a_L15
11.3.2_1_a_ii
Bus error: 10

At this point, the runner halts.

@srl295
Copy link
Member

srl295 commented Aug 12, 2015

@caridy I'm not sure what the regexp or the nu-native tests are trying to do, but the AED bug, if the error message is correct, is an actual bug.

@caridy
Copy link
Contributor Author

caridy commented Aug 12, 2015

ok. n.p. Let me try to get a repo ready with the instructions to run the tests, and we can go from there.

@srl295
Copy link
Member

srl295 commented Aug 12, 2015

@caridy sounds good. Would be a great thing to run in CI!

@caridy
Copy link
Contributor Author

caridy commented Aug 17, 2015

@srl295 I got some preliminary stuff flushed out this weekend, here is the repo: https://github.com/caridy/node-intl-testsuite

I'm running the same tests using two different harness, still undecided which one to use going forward, I'm waiting for @bterlson to see why tes262-harness is not running all tests, then we can decide.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants