Change test to workaround babylon bug (#184)
Babylon has a bug where it doesn't escape DirectiveLiteral properly. Except for `'use strict';`, this never happens in real world code, so let's put strings in a array in order to workaround this bug and have the same output on both parsers. https://github.com/babel/babylon/issues/289master
parent
d8c51483fc
commit
6f5df0e2b6
|
@ -1,46 +1,44 @@
|
|||
exports[`test strings.js 1`] = `
|
||||
"\"abc\"
|
||||
\'abc\'
|
||||
"[
|
||||
\"abc\",
|
||||
\'abc\',
|
||||
|
||||
\'\\\'\'
|
||||
\'\\\'\',
|
||||
|
||||
\'\"\'
|
||||
\'\\\"\'
|
||||
\'\\\\\"\'
|
||||
\'\"\',
|
||||
\'\\\"\',
|
||||
\'\\\\\"\',
|
||||
|
||||
\"\'\"
|
||||
\"\\\'\"
|
||||
\"\\\\\'\"
|
||||
\"\'\",
|
||||
\"\\\'\",
|
||||
\"\\\\\'\",
|
||||
|
||||
\"\'\\\"\"
|
||||
\'\\\'\"\'
|
||||
\"\'\\\"\",
|
||||
\'\\\'\"\',
|
||||
|
||||
\'\\\\\'
|
||||
\"\\\\\"
|
||||
\'\\\\\',
|
||||
\"\\\\\",
|
||||
|
||||
\'\\0\'
|
||||
\'🐶\'
|
||||
\'\\0\',
|
||||
\'🐶\',
|
||||
];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
\"abc\";
|
||||
\"abc\";
|
||||
|
||||
\"\'\";
|
||||
|
||||
\'\"\';
|
||||
\'\"\';
|
||||
\'\\\\\"\';
|
||||
|
||||
\"\'\";
|
||||
\"\'\";
|
||||
\"\\\\\'\";
|
||||
|
||||
\"\'\\\"\";
|
||||
\"\'\\\"\";
|
||||
|
||||
\"\\\\\";
|
||||
\"\\\\\";
|
||||
|
||||
\"\\u0000\";
|
||||
\"🐶\";
|
||||
[
|
||||
\"abc\",
|
||||
\"abc\",
|
||||
\"\'\",
|
||||
\'\"\',
|
||||
\'\"\',
|
||||
\'\\\\\"\',
|
||||
\"\'\",
|
||||
\"\'\",
|
||||
\"\\\\\'\",
|
||||
\"\'\\\"\",
|
||||
\"\'\\\"\",
|
||||
\"\\\\\",
|
||||
\"\\\\\",
|
||||
\"\\u0000\",
|
||||
\"🐶\"
|
||||
];
|
||||
"
|
||||
`;
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
"abc"
|
||||
'abc'
|
||||
[
|
||||
"abc",
|
||||
'abc',
|
||||
|
||||
'\''
|
||||
'\'',
|
||||
|
||||
'"'
|
||||
'\"'
|
||||
'\\"'
|
||||
'"',
|
||||
'\"',
|
||||
'\\"',
|
||||
|
||||
"'"
|
||||
"\'"
|
||||
"\\'"
|
||||
"'",
|
||||
"\'",
|
||||
"\\'",
|
||||
|
||||
"'\""
|
||||
'\'"'
|
||||
"'\"",
|
||||
'\'"',
|
||||
|
||||
'\\'
|
||||
"\\"
|
||||
'\\',
|
||||
"\\",
|
||||
|
||||
'\0'
|
||||
'🐶'
|
||||
'\0',
|
||||
'🐶',
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue