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

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

[elpa] externals/phps-mode a45b39a 339/405: Added two failing indentatio


From: Stefan Monnier
Subject: [elpa] externals/phps-mode a45b39a 339/405: Added two failing indentation tests for concatenated equal assignment and double arrow multi-line array declaration
Date: Sat, 13 Jul 2019 10:00:44 -0400 (EDT)

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

    Added two failing indentation tests for concatenated equal assignment and 
double arrow multi-line array declaration
---
 phps-mode-test-functions.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index ae9386b..b8c45ed 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -323,6 +323,12 @@
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (0 0)) (5 (0 0))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
 
   (phps-mode-test-with-buffer
+   "<?php\n$variable = array(\n    'random4' =>\n        
'hello'\n);\n$variable = true;\n"
+   "Array assignment with double arrow elements on four lines"
+   ;; (message "Tokens: %s" phps-mode-lexer-tokens)
+   (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (0 0)) (6 (0 
0))) (phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
+
+  (phps-mode-test-with-buffer
    "<?php\n$variable = array(\n    'random4');\n$variable = true;\n"
    "Array assignment on two lines"
    ;; (message "Tokens: %s" phps-mode-lexer-tokens)
@@ -335,6 +341,12 @@
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
 
   (phps-mode-test-with-buffer
+   "<?php\n$var .=\n    'A line';"
+   "Concatenated equal single-quoted-string on multiple-lines in assignment"
+   ;; (message "Tokens: %s" phps-mode-lexer-tokens)
+   (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
+
+  (phps-mode-test-with-buffer
    "<?php\n$str = <<<EOD\nExample of string\nspanning multiple lines\nusing 
heredoc syntax.\nEOD;\n"
    "Multi-line HEREDOC string in assignment"
    ;; (message "Tokens: %s" phps-mode-lexer-tokens)



reply via email to

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