tests(cli): add test for improper unicode encoding (#8162)

and updates swc_ecma_codegen

Closes #8161
This commit is contained in:
Kitson Kelly 2020-11-23 10:22:13 +11:00 committed by GitHub
parent e7fc7d7151
commit fec7fdc691
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View file

@ -0,0 +1,3 @@
export function getIndex(c: string): number {
return "\x00\r\n\x85\u2028\u2029".indexOf(c);
}

View file

@ -0,0 +1,3 @@
export function getIndex(c) {
return "\x00\r\n\x85\u2028\u2029".indexOf(c);
}