[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 7fa9fdb 024/405: More unit tests for lexing c
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 7fa9fdb 024/405: More unit tests for lexing comments and doc comments |
Date: |
Sat, 13 Jul 2019 09:59:32 -0400 (EDT) |
branch: externals/phps-mode
commit 7fa9fdbd99677f6c9d5555e02b2e1d676dd303ed
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
More unit tests for lexing comments and doc comments
---
phps-test-lexer.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/phps-test-lexer.el b/phps-test-lexer.el
index 2e6d918..719988a 100644
--- a/phps-test-lexer.el
+++ b/phps-test-lexer.el
@@ -129,6 +129,11 @@
'((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_ISSET 12 . 17) ("("
17 . 18) (T_VARIABLE 18 . 28) ("[" 28 . 29) (T_LNUMBER 29 . 30) ("]" 30 . 31)
("[" 31 . 32) (T_CONSTANT_ENCAPSED_STRING 32 . 38) ("]" 38 . 39) (")" 39 . 40)
("?" 41 . 42) (T_CONSTANT_ENCAPSED_STRING 43 . 48) (":" 49 . 50)
(T_CONSTANT_ENCAPSED_STRING 51 . 55) (";" 55 . 56)))))
(phps-mode/with-test-buffer
+ "<?php echo isset($backtrace[1]['file']) ? 'yes' : 'no';\n//a random
comment\n// another random comment\n/**\n * More comments\n* More\n **/\necho
$backtrace; ?>"
+ (should (equal phps-mode/lexer-tokens
+ '((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_ISSET 12 . 17) ("("
17 . 18) (T_VARIABLE 18 . 28) ("[" 28 . 29) (T_LNUMBER 29 . 30) ("]" 30 . 31)
("[" 31 . 32) (T_CONSTANT_ENCAPSED_STRING 32 . 38) ("]" 38 . 39) (")" 39 . 40)
("?" 41 . 42) (T_CONSTANT_ENCAPSED_STRING 43 . 48) (":" 49 . 50)
(T_CONSTANT_ENCAPSED_STRING 51 . 55) (";" 55 . 56) (T_COMMENT 57 . 75)
(T_COMMENT 76 . 101) (T_DOC_COMMENT 102 . 134) (T_ECHO 135 . 139) (T_VARIABLE
140 . 150) (";" 150 . 151) (";" 152 . 154) [...]
+
+ (phps-mode/with-test-buffer
"<?php $var EXIT die function return yield from yield try catch finally
throw if elseif endif else while endwhile do for endfor foreach endforeach
declare enddeclare instanceof as switch endswitch case default break continue
goto echo print class interface trait extends implements :: \\ ... ?? new clone
var (int) (integer) (real) (double) (float) (string) (binary) (array) (object)
(boolean) (bool) (unset) eval include include_once require require_once
namespace use insteadof global is [...]
(should (equal phps-mode/lexer-tokens
'((T_OPEN_TAG 1 . 7) (T_VARIABLE 7 . 11) (T_EXIT 12 . 16)
(T_DIE 17 . 20) (T_FUNCTION 21 . 29) (T_RETURN 30 . 36) (T_YIELD_FROM 37 . 48)
(T_YIELD 48 . 53) (T_TRY 54 . 57) (T_CATCH 58 . 63) (T_FINALLY 64 . 71)
(T_THROW 72 . 77) (T_IF 78 . 80) (T_ELSEIF 81 . 87) (T_ENDIF 88 . 93) (T_ELSE
94 . 98) (T_WHILE 99 . 104) (T_ENDWHILE 105 . 113) (T_DO 114 . 116) (T_FOR 117
. 120) (T_ENDFOR 121 . 127) (T_FOREACH 128 . 135) (T_ENDFOREACH 136 . 146)
(T_DECLARE 147 . 154) (T_ENDDECLA [...]
- [elpa] externals/phps-mode c4a8ca5 016/405: Free lexer tokens does not have properties anymore, (continued)
- [elpa] externals/phps-mode c4a8ca5 016/405: Free lexer tokens does not have properties anymore, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8ed0716 022/405: Started with unit tests for getting point lexer data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode abcfd01 021/405: Started with function to gather current point data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2475734 018/405: Improved logic for single quoted strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 795053b 013/405: Lexer unit tests using start and ends as well, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 95e749e 028/405: Started with indentation function, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3202213 025/405: Added another unit test for lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode bf59f0a 023/405: More unit tests for getting point lex information, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode de771b5 019/405: Added more unit tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e3a060a 026/405: Handles script breaking single-line comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7fa9fdb 024/405: More unit tests for lexing comments and doc comments,
Stefan Monnier <=
- [elpa] externals/phps-mode 64a3ca8 014/405: Modified start and end for single and double quoted strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3ea8c64 003/405: Added license, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f6e3ce4 027/405: Added another test for comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4fa9341 030/405: Started with unit tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 184dfa5 034/405: Indentation outside PHP now does nothing, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5c0568b 033/405: Added some basic unit tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 47440dd 036/405: Added test for decreasing indentation with letters, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9d3f644 032/405: Separated indentation tests for lexer tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d839f8a 029/405: More work on indentation support, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode efcefde 035/405: Added support for closing parenthesis and braces, Stefan Monnier, 2019/07/13