[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode dd4e6c134f 07/17: Added another unit-test for
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode dd4e6c134f 07/17: Added another unit-test for T_READONLY |
Date: |
Tue, 26 Jul 2022 08:44:19 -0400 (EDT) |
branch: externals/phps-mode
commit dd4e6c134f0bec5e160c284a0023ac700089c004
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Added another unit-test for T_READONLY
---
test/phps-mode-test-lexer.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/test/phps-mode-test-lexer.el b/test/phps-mode-test-lexer.el
index 4d6176e034..4ffdf1e11b 100644
--- a/test/phps-mode-test-lexer.el
+++ b/test/phps-mode-test-lexer.el
@@ -292,6 +292,15 @@
phps-mode-lex-analyzer--tokens
'((T_OPEN_TAG 1 . 7) (T_ENUM 7 . 13) (T_STRING 13 . 16) ("{" 17 . 18)
(T_CASE 23 . 27) (T_STRING 28 . 34) (";" 34 . 35) (T_CASE 40 . 44) (T_STRING 45
. 53) (";" 53 . 54) (T_CASE 59 . 63) (T_STRING 64 . 69) (";" 69 . 70) (T_CASE
75 . 79) (T_STRING 80 . 86) (";" 86 . 87) ("}" 88 . 89)))))
+
+ (phps-mode-test--with-buffer
+ "<?php\n\n\nclass MyClass\n{\n public function __construct(private
readonly type propertyName)\n {\n }\n}"
+ "Read-only auto-injected properties"
+ (should
+ (equal
+ phps-mode-lex-analyzer--tokens
+ '((T_OPEN_TAG 1 . 7) (T_CLASS 9 . 14) (T_STRING 15 . 22) ("{" 23 . 24)
(T_PUBLIC 29 . 35) (T_FUNCTION 36 . 44) (T_STRING 45 . 56) ("(" 56 . 57)
(T_PRIVATE 57 . 64) (T_READONLY 65 . 73) (T_STRING 74 . 78) (T_STRING 79 . 91)
(")" 91 . 92) ("{" 97 . 98) ("}" 103 . 104) ("}" 105 . 106)))))
+
(phps-mode-test--with-buffer
"<?php\nclass User {\n public readonly int $uid;\n\n public function
__construct(int $uid) {\n $this->uid = $uid;\n }\n}"
"Read-only Properties"
- [elpa] externals/phps-mode updated (69d4de374b -> a56b01bd3f), Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode dd4e6c134f 07/17: Added another unit-test for T_READONLY,
Christian Johansson <=
- [elpa] externals/phps-mode dbd63046ef 14/17: Fixed T_ENUM token length, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode d766293a8d 04/17: Added support for underscores, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode 585bc28fa5 01/17: Added T_ENUM and T_READONLY, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode 534c766344 03/17: Fixed number constants, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode 3a59ef2141 05/17: Added tests for new lexer tokens, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode b9f74656ad 02/17: Added ONUM regex, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode 4f936cd5cd 06/17: Fixed byte-compilation issue with new lexer rules, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode 3d4576eac6 08/17: Another fix for readonly, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode e50ecb53be 09/17: More debugging byte-compilation issue, Christian Johansson, 2022/07/26
- [elpa] externals/phps-mode 3f9898cd2a 11/17: Added instructions of how to update lexer rules, Christian Johansson, 2022/07/26