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

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

[elpa] externals/phps-mode e92bed3 54/62: Started debugging failing inde


From: Christian Johansson
Subject: [elpa] externals/phps-mode e92bed3 54/62: Started debugging failing indentation in some weird cases
Date: Tue, 20 Apr 2021 10:56:23 -0400 (EDT)

branch: externals/phps-mode
commit e92bed37c5f655cc287a2442d0a7491cd6c69290
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Started debugging failing indentation in some weird cases
---
 test/phps-mode-test-lex-analyzer.el | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/test/phps-mode-test-lex-analyzer.el 
b/test/phps-mode-test-lex-analyzer.el
index 75a2e2b..15ca578 100644
--- a/test/phps-mode-test-lex-analyzer.el
+++ b/test/phps-mode-test-lex-analyzer.el
@@ -269,6 +269,28 @@
               "<?php\nif ($shippingMethod->id ===\n    \\MyClass::METHOD_ID\n) 
{\n    "
               ))))
 
+  (setq phps-mode-idle-interval nil)
+  (phps-mode-test--with-buffer
+   ""
+   "Multi-line if block after opening parenthesis"
+   (execute-kbd-macro "<?php")
+   (execute-kbd-macro (kbd "<return>"))
+   (execute-kbd-macro "if (true) {")
+   (execute-kbd-macro (kbd "<return>"))
+   (execute-kbd-macro "if (")
+   (execute-kbd-macro (kbd "<return>"))
+   (message "minor-mode-alist: %S" minor-mode-alist)
+   (let ((buffer-contents
+          (buffer-substring-no-properties
+           (point-min)
+           (point-max))))
+     (message "buffer-contents: %S" buffer-contents)
+     (error "Here")
+     (should (equal
+              buffer-contents
+              "<?php\nif (true) {\n    if (\n        \n    )\n}"
+              ))))
+
   )
 
 (defun phps-mode-test-lex-analyzer--move-lines-indent ()



reply via email to

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