[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 2c9746b 101/405: Added switch case unit test
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 2c9746b 101/405: Added switch case unit test for lexer |
Date: |
Sat, 13 Jul 2019 09:59:52 -0400 (EDT) |
branch: externals/phps-mode
commit 2c9746b86dacd64c7698671d8d9dbebc044465fa
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added switch case unit test for lexer
---
phps-test-lexer.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/phps-test-lexer.el b/phps-test-lexer.el
index 629b17d..837ae26 100644
--- a/phps-test-lexer.el
+++ b/phps-test-lexer.el
@@ -107,6 +107,12 @@
'((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\nswitch (myRandomCondition()) {\ncase 'Something here':\necho
'Something else here';\n}\n"
+ ;; (message "Tokens: %s" phps-mode/lexer-tokens)
+ (should (equal phps-mode/lexer-tokens
+ '((T_OPEN_TAG 1 . 7) (T_SWITCH 7 . 13) ("(" 14 . 15)
(T_STRING 15 . 32) ("(" 32 . 33) (")" 33 . 34) (")" 34 . 35) ("{" 36 . 37)
(T_CASE 38 . 42) (T_CONSTANT_ENCAPSED_STRING 43 . 59) (":" 59 . 60) (T_ECHO 61
. 65) (T_CONSTANT_ENCAPSED_STRING 66 . 87) (";" 87 . 88) ("}" 89 . 90)))))
+
+ (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
- [elpa] externals/phps-mode a8561ab 096/405: Updated unit test for get-point-data with support for square brackets, (continued)
- [elpa] externals/phps-mode a8561ab 096/405: Updated unit test for get-point-data with support for square brackets, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dbc02bb 099/405: Improved syntax table, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 989cc7e 098/405: Fixed flycheck warning about semantic, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c5beb50 093/405: Added another unit test for indentation with special syntax, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3740660 095/405: Get point-data now collects information about square brackets, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6c8eea0 100/405: Added another failing indentation case for switch case, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a899707 102/405: Updated comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 89fac0b 094/405: Added another unit test for bracket less conditional, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6ac718c 104/405: Removed non-breaking space from syntax table, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a5beef1 097/405: Added support for square bracket indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2c9746b 101/405: Added switch case unit test for lexer,
Stefan Monnier <=
- [elpa] externals/phps-mode 47ad456 103/405: Fixed syntax table for white-spaces, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode cd1fdee 106/405: *** empty log message ***, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode efa297a 108/405: More work on renaming, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 529042e 109/405: More work on renaming, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7688cd7 111/405: Got incremental lexer working after renaming again, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9c4a3ba 117/405: More work on alternative control structures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3272991 110/405: Merge branch 'master' of https://github.com/cjohansson/emacs-phps-mode, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7c6ee3e 107/405: More work on renaming, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 46a8256 116/405: Starting implementation of tracking alternative control structure level, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9ac21f1 120/405: More work on inline and alternative control structures, Stefan Monnier, 2019/07/13