Skip to content

Commit 91f2590

Browse files
Keith Hallmitranim
Keith Hall
authored andcommitted
[PHP] add indentation tests (sublimehq#2328)
1 parent 03d98d0 commit 91f2590

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

PHP/tests/syntax_test_indentation.php

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// SYNTAX TEST reindent "Packages/PHP/PHP.sublime-syntax"
2+
3+
https://github.com/sublimehq/Packages/issues/1924
4+
<?php if (true): ?>
5+
asdfadf
6+
<?php elseif(false): ?>
7+
asdf
8+
<?php endif;?>
9+
10+
<?php
11+
if (true) {
12+
?>
13+
asdfadf
14+
<?php
15+
}
16+
17+
if (a == 2) {
18+
echo 'test';
19+
} elseif (b == 1) {
20+
echo b;
21+
}
22+
?>
23+
24+
https://github.com/sublimehq/Packages/issues/1175
25+
<?php
26+
if ('a:b') return;
27+
if ('a:b') { return; }
28+
if (true) echo('a:b');
29+
?>
30+
31+
https://github.com/sublimehq/Packages/issues/901
32+
<?
33+
function test()
34+
{
35+
if (true)
36+
{
37+
blah;
38+
}
39+
else
40+
{
41+
ok;
42+
}
43+
44+
if (true)
45+
{
46+
blah;
47+
} else
48+
{
49+
ok;
50+
}
51+
52+
if (true)
53+
blah;
54+
else {
55+
ok;
56+
}
57+
}
58+
?>
File renamed without changes.

0 commit comments

Comments
 (0)