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

workaround Unicode compatibility in testing #5206

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

alexlamsl
Copy link
Collaborator

No description provided.

@alexlamsl
Copy link
Collaborator Author

@kzc this should take care of the remaining issues in node-v4.2.1

The only other test with code points outside of the Basic Multilingual Plane does not call sandbox.run_code():

it("Should reject invalid code points in Unicode escape sequence", function() {
[
// A bit over the valid range
'"\\u{110000}"',
// 32-bit overflow resulting in "a"
'"\\u{100000061}"',
].forEach(function(test) {
assert.throws(function() {
UglifyJS.parse(test);
}, function(e) {
return e instanceof UglifyJS.JS_Parse_Error
&& /^Invalid escape sequence: \\u{1/.test(e.message);
}, test);
});
});

@kzc
Copy link
Contributor

kzc commented Dec 7, 2021

That does the trick. Both node-v4.2.1 test/compress.js unicode.js and node-v4.2.1 test/mocha.js pass without error.

@alexlamsl alexlamsl merged commit 8f39491 into mishoo:master Dec 7, 2021
@alexlamsl alexlamsl deleted the unicode branch December 7, 2021 10:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants