branch: externals/phps-mode
commit 52cfc78cbb66b1e669625903adff12027365dde1
Author: Christian Johansson <christ...@cvj.se>
Commit: Christian Johansson <christ...@cvj.se>

    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