emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/phps-mode 3202213 025/405: Added another unit test for


From: Stefan Monnier
Subject: [elpa] externals/phps-mode 3202213 025/405: Added another unit test for lexer
Date: Sat, 13 Jul 2019 09:59:32 -0400 (EDT)

branch: externals/phps-mode
commit 32022133af3e8471e8cd384137ad5784b67488fe
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    Added another unit test for lexer
---
 phps-test-lexer.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/phps-test-lexer.el b/phps-test-lexer.el
index 719988a..62bbe0d 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 myFunction(); "
+   (should (equal phps-mode/lexer-tokens
+                  '((T_OPEN_TAG 1 . 7) (T_STRING 7 . 17) ("(" 17 . 18) (")" 18 
. 19) (";" 19 . 20)))))
+
+  (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)  [...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]