Skip to content

Commit

Permalink
Add more tests for formatting preservation with InlineHTML
Browse files Browse the repository at this point in the history
It's all broken...

(cherry picked from commit bad10e1)
  • Loading branch information
nikic committed Nov 12, 2022
1 parent e072fd2 commit a4fe65b
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion test/code/formatPreservation/inlineHtml.test
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,58 @@ function test() {
foo();<?php
baz();
baz();
}
}
-----
<?php

function test() {
foo();
?>Bar<?php
baz();
}
-----
// TODO Fix broken result
unset($stmts[0]->stmts[2]);
-----
<?php

function test() {
foo();
?>Bar
}
-----
<?php

function test() {
foo();
?>Bar<?php
baz();
}
-----
// TODO Fix broken result
array_splice($stmts[0]->stmts, 0, 1, []);
-----
<?php

function test() {
Bar<?php
baz();
}
-----
<?php

function test() {
foo();
?>Bar<?php
baz();
}
-----
// TODO Fix broken result
array_splice($stmts[0]->stmts, 1, 1, []);
-----
<?php

function test() {
foo();<?php
baz();
}

0 comments on commit a4fe65b

Please sign in to comment.