Skip to content

Commit e9e161a

Browse files
committed
Fix face tests
1 parent b4a0034 commit e9e161a

6 files changed

+77
-30
lines changed

Diff for: tests/arrays.php.faces

+15-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,23 @@
55
("Array should be treated like a normal keyword\n" . font-lock-comment-face)
66
("$" . php-variable-sigil)
77
("test" . php-variable-name)
8-
(" = ")
8+
(" ")
9+
("=" . php-assignment-op)
10+
(" ")
911
("array" . php-keyword)
1012
("();\n\n")
1113
("$" . php-variable-sigil)
1214
("test" . php-variable-name)
13-
(" = ")
15+
(" ")
16+
("=" . php-assignment-op)
17+
(" ")
1418
("function" . php-keyword)
1519
("(")
1620
("$" . php-variable-sigil)
1721
("test" . php-variable-name)
18-
(" = ")
22+
(" ")
23+
("=" . php-assignment-op)
24+
(" ")
1925
("array" . php-keyword)
2026
("()) {\n};\n\n")
2127
("// " . font-lock-comment-delimiter-face)
@@ -28,15 +34,19 @@
2834
("- return type, should look like `: int`\n" . font-lock-comment-face)
2935
("$" . php-variable-sigil)
3036
("test" . php-variable-name)
31-
(" = (")
37+
(" ")
38+
("=" . php-assignment-op)
39+
(" (")
3240
("array" . font-lock-type-face)
3341
(")")
3442
("$" . php-variable-sigil)
3543
("test" . php-variable-name)
3644
(";\n\n")
3745
("$" . php-variable-sigil)
3846
("test" . php-variable-name)
39-
(" = ")
47+
(" ")
48+
("=" . php-assignment-op)
49+
(" ")
4050
("function" . php-keyword)
4151
("(")
4252
("array" . font-lock-type-face)

Diff for: tests/constants.php.faces

+9-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44
("// " . font-lock-comment-delimiter-face)
55
("Test c-lang-defconst c-constant-kwds\n" . font-lock-comment-face)
66
("true" . php-constant)
7-
(" === ")
7+
(" ")
8+
("===" . php-comparison-op)
9+
(" ")
810
("TRUE" . php-constant)
911
(";\n")
1012
("false" . php-constant)
11-
(" === ")
13+
(" ")
14+
("===" . php-comparison-op)
15+
(" ")
1216
("FALSE" . php-constant)
1317
(";\n")
1418
("null" . php-constant)
15-
(" === ")
19+
(" ")
20+
("===" . php-comparison-op)
21+
(" ")
1622
("NULL" . php-constant)
1723
(";\n\n")
1824
("// " . font-lock-comment-delimiter-face)

Diff for: tests/identifiers.php.faces

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,36 @@
33
("\n\n")
44
("$" . php-variable-sigil)
55
("object" . php-variable-name)
6-
(" = ")
6+
(" ")
7+
("=" . php-assignment-op)
8+
(" ")
79
("new" . php-keyword)
810
(" ")
911
("UnqualifiedClassName" . font-lock-type-face)
1012
(";\n")
1113
("$" . php-variable-sigil)
1214
("object" . php-variable-name)
13-
(" = ")
15+
(" ")
16+
("=" . php-assignment-op)
17+
(" ")
1418
("new" . php-keyword)
1519
(" ")
1620
("\\FullyQualifiedClassName" . font-lock-type-face)
1721
(";\n")
1822
("$" . php-variable-sigil)
1923
("object" . php-variable-name)
20-
(" = ")
24+
(" ")
25+
("=" . php-assignment-op)
26+
(" ")
2127
("new" . php-keyword)
2228
(" ")
2329
("SpaceName\\NamespacedClassName" . font-lock-type-face)
2430
(";\n")
2531
("$" . php-variable-sigil)
2632
("object" . php-variable-name)
27-
(" = ")
33+
(" ")
34+
("=" . php-assignment-op)
35+
(" ")
2836
("new" . php-keyword)
2937
(" ")
3038
("NOTACONSTANT\\ClassName" . font-lock-type-face)

Diff for: tests/issue-439.php.faces

+25-10
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,62 @@
77
("\n\n")
88
("$" . php-variable-sigil)
99
("a" . php-variable-name)
10-
(" = ")
10+
(" ")
11+
("=" . php-assignment-op)
12+
(" ")
1113
("<<<ABC\nLet'go Justin\nABC" . php-string)
1214
(";\n\n")
1315
("$" . php-variable-sigil)
1416
("b" . php-variable-name)
15-
(" = ")
17+
(" ")
18+
("=" . php-assignment-op)
19+
(" ")
1620
("<<<A_B_C\nLet'go Justin\nA_B_C" . php-string)
1721
(";\n\n")
1822
("$" . php-variable-sigil)
1923
("c" . php-variable-name)
20-
(" = ")
24+
(" ")
25+
("=" . php-assignment-op)
26+
(" ")
2127
("<<<'A_B_C'\nLet'go Justin\nA_B_C" . php-string)
2228
(";\n\n")
2329
("$" . php-variable-sigil)
2430
("d" . php-variable-name)
25-
(" = ")
31+
(" ")
32+
("=" . php-assignment-op)
33+
(" ")
2634
("<<<\"A_B_C\"\nLet'go Justin\nA_B_C" . php-string)
2735
(";\n\n")
2836
("$" . php-variable-sigil)
2937
("e" . php-variable-name)
30-
(" = ")
38+
(" ")
39+
("=" . php-assignment-op)
40+
(" ")
3141
("<<<いろは\nLet'go Justin\nいろは" . php-string)
3242
(";\n\n")
3343
("$" . php-variable-sigil)
3444
("f" . php-variable-name)
35-
(" = ")
45+
(" ")
46+
("=" . php-assignment-op)
47+
(" ")
3648
("<<<'いろは'\nLet'go Justin\nいろは" . php-string)
3749
(";\n\n")
3850
("$" . php-variable-sigil)
3951
("g" . php-variable-name)
40-
(" = ")
52+
(" ")
53+
("=" . php-assignment-op)
54+
(" ")
4155
("<<<\"いろは\"\nLet'go Justin\nいろは" . php-string)
4256
(";\n\n")
4357
("var_dump" . php-function-call)
4458
("(")
4559
("<<<\"ABC\"\nLet'go Justin\nABC" . php-string)
4660
(");\n\n")
4761
("if" . php-keyword)
48-
(" (1 === 1) {\n ")
62+
(" (1 ")
63+
("===" . php-comparison-op)
64+
(" 1) {\n ")
4965
("var_dump" . php-function-call)
5066
("(")
5167
("<<<\"ABC\"\n Let'go Justin\n ABC" . php-string)
52-
(");\n}\n")
53-
)
68+
(");\n}\n"))

Diff for: tests/issue-443.php.27.faces

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
("declare" . php-keyword)
55
("(")
66
("strict_types" . php-keyword)
7-
("=1); ")
7+
("=" . php-assignment-op)
8+
("1); ")
89
("?>" . php-php-tag)
910
("\n")
1011
("/** GitHub Issue: " . font-lock-doc-face)
1112
("https://github.com/emacs-php/php-mode/issues/443" link font-lock-doc-face)
1213
(" */" . font-lock-doc-face)
1314
("\n")
1415
("<?xml" . php-php-tag)
15-
(" version=")
16+
(" version")
17+
("=" . php-assignment-op)
1618
("\"1.0\"" . php-string)
1719
(" ")
1820
("encoding" . php-keyword)
19-
("=")
21+
("=" . php-assignment-op)
2022
("\"UTF-8\"" . php-string)
2123
("?>" . php-php-tag)
2224
("\n")
@@ -51,7 +53,9 @@
5153
("?>" . php-php-tag)
5254
("\n")
5355
("<?=" . php-php-tag)
54-
(" 1 + 1 ")
56+
(" 1 ")
57+
("+" . php-arithmetic-op)
58+
(" 1 ")
5559
("?>" . php-php-tag)
5660
("\n")
5761
("<?php" . php-php-tag)

Diff for: tests/issue-443.php.faces

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
("declare" . php-keyword)
55
("(")
66
("strict_types" . php-keyword)
7-
("=1); ")
7+
("=" . php-assignment-op)
8+
("1); ")
89
("?>" . php-php-tag)
910
("\n")
1011
("/** GitHub Issue: " . font-lock-doc-face)
1112
("https://github.com/emacs-php/php-mode/issues/443" link font-lock-doc-face)
1213
(" */" . font-lock-doc-face)
1314
("\n")
1415
("<?xml" . php-php-tag)
15-
(" version=")
16+
(" version")
17+
("=" . php-assignment-op)
1618
("\"1.0\"" . php-string)
1719
(" ")
1820
("encoding" . php-keyword)
19-
("=")
21+
("=" . php-assignment-op)
2022
("\"UTF-8\"" . php-string)
2123
("?>" . php-php-tag)
2224
("\n")
@@ -51,7 +53,9 @@
5153
("?>" . php-php-tag)
5254
("\n")
5355
("<?=" . php-php-tag)
54-
(" 1 + 1 ")
56+
(" 1 ")
57+
("+" . php-arithmetic-op)
58+
(" 1 ")
5559
("?>" . php-php-tag)
5660
("\n")
5761
("<?php" . php-php-tag)

0 commit comments

Comments
 (0)