[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode ec3fd41 289/405: Added failing indent test fo
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode ec3fd41 289/405: Added failing indent test for mixed concatenation and function call |
Date: |
Sat, 13 Jul 2019 10:00:34 -0400 (EDT) |
branch: externals/phps-mode
commit ec3fd41b443dce03d7c90c71744001a3ea59ab0a
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added failing indent test for mixed concatenation and function call
---
phps-mode-test-functions.el | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 6a26ee5..c0c63be 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -49,8 +49,6 @@
"Round and square bracket expressions"
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)) (5 (2 0)) (6 (1
0)) (7 (1 0)) (8 (0 0))) (phps-mode-test-hash-to-list
(phps-mode-functions-get-lines-indent)))))
- ;; TODO Test <?php\necho 'blaha'\n . 'ijeije' . __(\n 'okeoke'\n
)\n 'okeoke';\n?>
-
(phps-mode-test-with-buffer
"<?php\nvar_dump(array(<<<EOD\nfoobar!\nEOD\n));\n?>"
"HEREDOC in arguments example"
@@ -158,6 +156,24 @@
"Do while loop with multi-line condition"
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (0 0)) (5 (1 0)) (6 (0
0))) (phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
+ (phps-mode-test-with-buffer
+ "<?php\ndo {\n echo 'true';\n} while ($number > 0\n && $letter >
0\n);"
+ "Do while loop with multi-line condition"
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (0 0)) (5 (1 0)) (6 (0
0))) (phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
+
+ (phps-mode-test-with-buffer
+ "<?php\n$myVar = 'blaha'\n . 'ijeije' . __(\n 'okeoke'\n )\n
. 'okeoke';\n?>"
+ "Concatenated assignment string with function call"
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (1 0)) (6 (1
0)) (7 (0 0))) (phps-mode-test-hash-to-list
(phps-mode-functions-get-lines-indent)))))
+
+ (phps-mode-test-with-buffer
+ "<?php\necho 'blaha'\n . 'ijeije' . __(\n 'okeoke'\n )\n .
'okeoke';\n?>"
+ "Concatenated echo string with function call"
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (1 0)) (6 (1
0)) (7 (0 0))) (phps-mode-test-hash-to-list
(phps-mode-functions-get-lines-indent)))))
+
+
+ ;; TODO Add tests for all examples here: https://www.php-fig.org/psr/psr-2/
+
)
(defun phps-mode-test-functions-get-lines-indent-multi-line-assignments ()
@@ -629,12 +645,10 @@
)
-;; TODO Add tests for all examples here: https://www.php-fig.org/psr/psr-2/
-
(defun phps-mode-test-functions ()
"Run test for functions."
;; (setq debug-on-error t)
- ;; (setq phps-mode-functions-verbose t)
+ (setq phps-mode-functions-verbose t)
(phps-mode-test-functions-get-lines-lindent-if)
(phps-mode-test-functions-get-lines-indent-classes)
(phps-mode-test-functions-get-lines-indent-inline-if)
- [elpa] externals/phps-mode e639ea3 299/405: Indent passing new concatenation tests, (continued)
- [elpa] externals/phps-mode e639ea3 299/405: Indent passing new concatenation tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5be3560 291/405: Adding more indent examples from PSR-2, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 74ab2a7 294/405: Work on incremental lexer and failing test for indent, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b31f817 292/405: Added all examples from PSR-2 as tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2087abd 282/405: Added two failing tests for switch indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 43c13b4 295/405: Started on new algorithm for concatenation indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b2ff76e 283/405: Started on debugging switch indentation bug, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1aadb1b 285/405: Added failing lexer test for comment vs doc-comment, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 95de04b 274/405: New layout for lexer grammar passes unit tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 00d3568 290/405: Added indentation examples from official PSR-2, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ec3fd41 289/405: Added failing indent test for mixed concatenation and function call,
Stefan Monnier <=
- [elpa] externals/phps-mode cc77604 284/405: Fixed bug with indentation after switch case statements, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode eeffdb2 315/405: Fixed trailing white-space, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 02b69f5 304/405: Tests for PSR-2 now passes with new algorithms, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b251a1e 314/405: Got unit tests for wrapping region in symbols working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 20199b0 307/405: Added byte-compiled Lisp to gitignore, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a0b7695 316/405: Passes unit tests for integration with electric-pair, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7c3a31a 305/405: Fixed bug in indentation with stacked assignment closures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 68422f5 301/405: Restored indentation test for PSR-2 closure, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f3766db 310/405: Fixed byte-compilation in lexer and integration-tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2ec6f6d 306/405: Fixed some compilation warnings, Stefan Monnier, 2019/07/13