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

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

[elpa] externals/phps-mode 52cfc78 281/405: Added failing indent test


From: Stefan Monnier
Subject: [elpa] externals/phps-mode 52cfc78 281/405: Added failing indent test
Date: Sat, 13 Jul 2019 10:00:32 -0400 (EDT)

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

    Added failing indent test
---
 phps-mode-test-functions.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index f93e4d5..b3959ae 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -337,6 +337,12 @@
    "Switch, case, default with alternative control structure"
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (2 0)) (6 (1 
0)) (7 (2 0)) (8 (1 0)) (9 (2 0)) (10 (0 0))) (phps-mode-test-hash-to-list 
(phps-mode-functions-get-lines-indent)))))
 
+  (phps-mode-test-with-buffer
+   "<?php\nif (true) {\n    switch ($condition) {\n        case true:\n        
    echo 'here';\n            echo 'here 2';\n        case false:\n            
echo 'here 4';\n        default:\n            echo 'here 3';\n    }\n    
sprintf(__(\n        'Error: %s',\n        $error\n    ));\n}\n"
+   "Switch, case, default with exception after it"
+   (message "Indent: %s" (phps-mode-test-hash-to-list 
(phps-mode-functions-get-lines-indent)))
+   (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (3 0)) (6 (3 
0)) (7 (2 0)) (8 (3 0)) (9 (2 0)) (10 (3 0)) (11 (1 0)) (12 (1 0)) (13 (2 0)) 
(14 (2 0)) (15 (1 0)) (16 (0 0))) (phps-mode-test-hash-to-list 
(phps-mode-functions-get-lines-indent)))))
+
   )
 
 (defun phps-mode-test-functions-indent-line ()



reply via email to

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