Commit 27e9bce7 authored by Jackson Ray Hamilton's avatar Jackson Ray Hamilton

Add new (failing) unclosed JSX test and separate such tests

* test/manual/indent/js-jsx.js: Move test with intentional scan error to
its own file, js-jsx-unclosed-1.js.
* test/manual/indent/js-jsx-unclosed-1.js: New file.
* test/manual/indent/js-jsx-unclosed-2.js: New file with test for
regression caused by new ambiguous parsing of JS/JSX.
parent 4b305bb1
// -*- mode: js-jsx; -*-
// Local Variables:
// indent-tabs-mode: nil
// js-indent-level: 2
// End:
// The following test goes below any comments to avoid including
// misindented comments among the erroring lines.
return (
<div>
{array.map(function () {
return {
a: 1
// -*- mode: js-jsx; -*-
// Local Variables:
// indent-tabs-mode: nil
// js-indent-level: 2
// End:
// The following tests go below any comments to avoid including
// misindented comments among the erroring lines.
// Don’t misinterpret equality operators as JSX.
for (; i < length;) void 0
if (foo > bar) void 0
// Don’t even misinterpret unary operators as JSX.
if (foo < await bar) void 0
while (await foo > bar) void 0
......@@ -257,12 +257,3 @@ return (
// indent-tabs-mode: nil
// js-indent-level: 2
// End:
// The following test has intentionally unclosed elements and should
// be placed below all other tests to prevent awkward indentation.
return (
<div>
{array.map(function () {
return {
a: 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment