Skip to content

Commit a4fe65b

Browse files
committed
Add more tests for formatting preservation with InlineHTML
It's all broken... (cherry picked from commit bad10e1)
1 parent e072fd2 commit a4fe65b

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

test/code/formatPreservation/inlineHtml.test

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,58 @@ function test() {
5151
foo();<?php
5252
baz();
5353
baz();
54-
}
54+
}
55+
-----
56+
<?php
57+
58+
function test() {
59+
foo();
60+
?>Bar<?php
61+
baz();
62+
}
63+
-----
64+
// TODO Fix broken result
65+
unset($stmts[0]->stmts[2]);
66+
-----
67+
<?php
68+
69+
function test() {
70+
foo();
71+
?>Bar
72+
}
73+
-----
74+
<?php
75+
76+
function test() {
77+
foo();
78+
?>Bar<?php
79+
baz();
80+
}
81+
-----
82+
// TODO Fix broken result
83+
array_splice($stmts[0]->stmts, 0, 1, []);
84+
-----
85+
<?php
86+
87+
function test() {
88+
Bar<?php
89+
baz();
90+
}
91+
-----
92+
<?php
93+
94+
function test() {
95+
foo();
96+
?>Bar<?php
97+
baz();
98+
}
99+
-----
100+
// TODO Fix broken result
101+
array_splice($stmts[0]->stmts, 1, 1, []);
102+
-----
103+
<?php
104+
105+
function test() {
106+
foo();<?php
107+
baz();
108+
}

0 commit comments

Comments
 (0)