[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode de771b5 019/405: Added more unit tests
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode de771b5 019/405: Added more unit tests |
Date: |
Sat, 13 Jul 2019 09:59:31 -0400 (EDT) |
branch: externals/phps-mode
commit de771b5dd89820d1b98eb90b3a687b19b468320b
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added more unit tests
---
phps-test-lexer.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/phps-test-lexer.el b/phps-test-lexer.el
index 781668b..b2744cc 100644
--- a/phps-test-lexer.el
+++ b/phps-test-lexer.el
@@ -115,6 +115,17 @@
'((T_OPEN_TAG 1 . 7) (T_VARIABLE 7 . 11) ("=" 12 . 13) ("["
14 . 15) ("]" 15 . 16) (";" 16 . 17)))))
(phps-mode/with-test-buffer
+ "<?php $var = ''; $var = 'abc'; "
+ (should (equal phps-mode/lexer-tokens
+ '((T_OPEN_TAG 1 . 7) (T_VARIABLE 7 . 11) ("=" 12 . 13)
(T_CONSTANT_ENCAPSED_STRING 14 . 16) (";" 16 . 17) (T_VARIABLE 18 . 22) ("=" 23
. 24) (T_CONSTANT_ENCAPSED_STRING 25 . 30) (";" 30 . 31)))))
+
+ (phps-mode/with-test-buffer
+ "<?php $var = \"\"; $var = \"abc\"; $var = \"abc\\def\\ghj\";"
+ ;; (message "Tokens: %s" phps-mode/lexer-tokens)
+ (should (equal phps-mode/lexer-tokens
+ '((T_OPEN_TAG 1 . 7) (T_VARIABLE 7 . 11) ("=" 12 . 13)
(T_CONSTANT_ENCAPSED_STRING 14 . 16) (";" 16 . 17) (T_VARIABLE 18 . 22) ("=" 23
. 24) (T_CONSTANT_ENCAPSED_STRING 25 . 30) (";" 30 . 31) (T_VARIABLE 32 . 36)
("=" 37 . 38) (T_CONSTANT_ENCAPSED_STRING 39 . 52) (";" 52 . 53)))))
+
+ (phps-mode/with-test-buffer
"<?php echo isset($backtrace[1]['file']) ? 'yes' : 'no'; "
(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)))))
- [elpa] externals/phps-mode 41c4fbb 009/405: Lexer unit tests now working, (continued)
- [elpa] externals/phps-mode 41c4fbb 009/405: Lexer unit tests now working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode be078dc 020/405: Updated readme, Stefan Monnier, 2019/07/13
- [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 <=
- [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, 2019/07/13
- [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