branch: externals/phps-mode commit 5a6a96bbcd32480fdf10f65ac747c9bf6eae419d Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Added another test --- phps-test-lexer.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phps-test-lexer.el b/phps-test-lexer.el index 78a0674..0d329a0 100644 --- a/phps-test-lexer.el +++ b/phps-test-lexer.el @@ -106,6 +106,12 @@ (should (equal string-tokens " T_OPEN_TAG T_ECHO T_VARIABLE = T_ARRAY ( T_CONSTANT_ENCAPSED_STRING ) ;")))) (phps-mode/with-test-buffer + "<?php if (empty($parameters[self::PARAMETER_CONFIGURATION_INTERNAL_FILENAME])) { $parameters[self::PARAMETER_CONFIGURATION_INTERNAL_FILENAME] = ''; }" + (let* ((tokens phps-mode/lexer-tokens) + (string-tokens (phps-mode/token-stream-to-string tokens))) + (should (equal string-tokens " T_OPEN_TAG T_IF ( T_EMPTY ( T_VARIABLE [ T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING ] ) ) { T_VARIABLE [ T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING ] = T_CONSTANT_ENCAPSED_STRING ; }")))) + + (phps-mode/with-test-buffer "<?php echo $var = array(\"\");" (let* ((tokens phps-mode/lexer-tokens) (string-tokens (phps-mode/token-stream-to-string tokens)))