implement --expression (#5607)

This commit is contained in:
Alex Lam S.L
2022-08-07 20:42:18 +01:00
committed by GitHub
parent 07953b36b0
commit f451a7ad79
10 changed files with 143 additions and 50 deletions

View File

@@ -131,19 +131,34 @@ valid_after_invalid_2: {
}
issue_5368_1: {
expression = true
options = {
directives: true,
expression: true,
}
input: {
"foo";
}
expect: {
"foo";
"foo"
}
expect_exact: '"foo"'
expect_stdout: "foo"
}
issue_5368_2: {
expression = true
options = {
directives: true,
expression: true,
}
input: {
(function() {
"foo";
})()
}
expect_exact: "function(){}()"
expect_stdout: "undefined"
}
issue_5368_3: {
options = {
directives: true,
expression: true,