forked from formatjs/formatjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test262.BUILD
173 lines (157 loc) · 5.66 KB
/
test262.BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
filegroup(
name = "test262-pluralrules",
srcs = glob(
["test/intl402/PluralRules/**/*.js"],
# TODO: support selectRange
exclude = [
"**/proto-from-ctor-realm.js",
"**/selectRange/**",
],
),
visibility = ["@//packages/intl-pluralrules:__pkg__"],
)
filegroup(
name = "test262-numberformat",
srcs = glob(
["test/intl402/NumberFormat/**/*.js"],
exclude = [
"**/builtin.js", # Built-in functions cannot have `prototype` property.
"**/constructor-order.js", # buggy test case. The spec states that impl should throw RangeError.
"**/constructor-locales-hasproperty.js", # This checks that we only iterate once...
"**/constructor-unit.js", # buggy test case. The spec states that impl should throw RangeError.
"**/currency-digits.js", # AFN's currency digits differ from CLDR data.
"**/legacy-regexp-statics-not-modified.js", # TODO
"**/proto-from-ctor-realm.js", # Bc of Realm support
"**/constructor-locales-get-tostring.js", # Bc our Intl.getCanonicalLocales isn't really spec-compliant
"**/taint-Object-prototype.js", # Bc our Intl.getCanonicalLocales isn't really spec-compliant
"**/numbering-systems.js", # See https://github.com/tc39/ecma402/issues/479
"**/dft-currency-mnfd-range-check-mxfd.js", # TODO
"**/intl-legacy-constructed-symbol-on-unwrap.js",
],
),
visibility = ["@//packages/intl-numberformat:__pkg__"],
)
filegroup(
name = "test262-listformat",
srcs = glob(
["test/intl402/ListFormat/**/*.js"],
exclude = [
"**/options-undefined.js", # TODO
"**/options-toobject-prototype.js", # TODO
"**/locales-valid.js", # f7e8dba39b1143b45c37ee137e406889b56bc335 added grandfathered locale which we
"**/proto-from-ctor-realm.js", # Bc of Realm support
],
),
visibility = ["@//packages/intl-listformat:__pkg__"],
)
filegroup(
name = "test262-locale",
srcs = glob(
["test/intl402/Locale/**/*.js"],
exclude = [
"**/branding.js", # TODO: lazy
"**/*-grandfathered.js", # TODO: we don't care about grandfathered tbh
"**/proto-from-ctor-realm.js", # TODO: not sure how to deal w/ Realm
"**/canonicalize-locale-list-take-locale.js",
"**/constructor-apply-options-canonicalizes-twice.js",
"**/constructor-getter-order.js",
"**/constructor-non-iana-canon.js",
"**/constructor-options-canonicalized.js",
"**/constructor-options-region-valid.js",
"**/constructor-tag-tostring.js",
"**/removing-likely-subtags-first-adds-likely-subtags.js",
"**/likely-subtags.js",
"**/constructor-tag.js",
],
),
visibility = ["@//packages/intl-locale:__pkg__"],
)
filegroup(
name = "test262-datetimeformat",
srcs = glob(
["test/intl402/DateTimeFormat/**/*.js"],
exclude = [
"**/formatRange.js", # See https://github.com/tc39/ecma402/pull/438
],
),
visibility = ["@//packages/intl-datetimeformat:__pkg__"],
)
filegroup(
name = "test262-relativetimeformat",
srcs = glob(
["test/intl402/RelativeTimeFormat/**/*.js"],
exclude = [
"**/options-undefined.js", # TODO
"**/options-proto.js", # TODO
"**/options-toobject-prototype.js", # TODO
"**/locales-valid.js", # f7e8dba39b1143b45c37ee137e406889b56bc335 added grandfathered locale which we
"**/proto-from-ctor-realm.js", # Bc of Realm support
# TODO
"**/pl-pl-style-long.js",
"**/pl-pl-style-narrow.js",
"**/pl-pl-style-short.js",
],
),
visibility = ["@//packages/intl-relativetimeformat:__pkg__"],
)
filegroup(
name = "test262-displaynames",
srcs = glob(
["test/intl402/DisplayNames/**/*.js"],
exclude = [
"**/return-object.js", # We need to fix default content support.
"**/proto-from-ctor-realm.js", # Bc of Realm support
"**/options-type-invalid-throws.js", # TODO
],
),
visibility = ["@//packages/intl-displaynames:__pkg__"],
)
filegroup(
name = "test262-harness",
srcs = glob(
[
"harness/**/*.js",
] + ["package.json"],
),
)
copy_to_bin(
name = "test262-harness-copy",
srcs = [":test262-harness"],
visibility = ["//visibility:public"],
)
copy_to_bin(
name = "test262-pluralrules-copy",
srcs = [":test262-pluralrules"],
visibility = ["@//packages/intl-pluralrules:__pkg__"],
)
copy_to_bin(
name = "test262-displaynames-copy",
srcs = [":test262-displaynames"],
visibility = ["@//packages/intl-displaynames:__pkg__"],
)
copy_to_bin(
name = "test262-listformat-copy",
srcs = [":test262-listformat"],
visibility = ["@//packages/intl-listformat:__pkg__"],
)
copy_to_bin(
name = "test262-numberformat-copy",
srcs = [":test262-numberformat"],
visibility = ["@//packages/intl-numberformat:__pkg__"],
)
copy_to_bin(
name = "test262-datetimeformat-copy",
srcs = [":test262-datetimeformat"],
visibility = ["@//packages/intl-datetimeformat:__pkg__"],
)
copy_to_bin(
name = "test262-relativetimeformat-copy",
srcs = [":test262-relativetimeformat"],
visibility = ["@//packages/intl-relativetimeformat:__pkg__"],
)
copy_to_bin(
name = "test262-locale-copy",
srcs = [":test262-locale"],
visibility = ["@//packages/intl-locale:__pkg__"],
)