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

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

[elpa] externals/phps-mode 733f36a123 203/212: Added more failing indent


From: Christian Johansson
Subject: [elpa] externals/phps-mode 733f36a123 203/212: Added more failing indentation tests
Date: Wed, 26 Jan 2022 01:51:27 -0500 (EST)

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

    Added more failing indentation tests
---
 TODO.md                       |  2 +-
 test/phps-mode-test-indent.el | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/TODO.md b/TODO.md
index c234814e8e..58c2a82ef1 100644
--- a/TODO.md
+++ b/TODO.md
@@ -18,5 +18,5 @@
     }
 
 * Imenu-generation of conditionally defined functions and classes
-
+* Cache elisp data in file-system
 
diff --git a/test/phps-mode-test-indent.el b/test/phps-mode-test-indent.el
index 8e9e7f124c..01e88bfd33 100644
--- a/test/phps-mode-test-indent.el
+++ b/test/phps-mode-test-indent.el
@@ -640,11 +640,25 @@
    "<?php\nif (true) {\n    echo '<script type=\"text/javascript\">'\n        
. 'jQuery(document).ready(function() { '\n        . 'window.open(\"'\n        . 
$url . '\", \"_blank\");'\n        . ' });</script>';\n}"
    "Multi-line echo statement with HTML markup 3")
 
-  ;; TODO Make this pass
   (phps-mode-test-indent--should-equal
    "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    
<title>Was here</title>\n    <meta charset=\"ISO-8559-1\" />\n</head>\n<body>\n 
   <div>\n        <p>\n            My mixed content\n            <br>\n         
   Was here\n        </p>\n    </div>\n</body>\n</html>"
    "Plain HTML markup")
 
+  (phps-mode-test-indent--should-equal
+   "<?php\n\nif (true) {\n    if (\n        true\n    ) {\n        return 
false;\n    }\n\n    /**\n     * My first line,\n     * my second line.\n     
*\n     * @since Module 1.0.0\n     */\n    echo 'here';\n\n}\n"
+   "Doc-comment ending with comma and dot.")
+
+  (phps-mode-test-indent--should-equal
+   "<?php\nif (true) {\n    if (\n        (!isset(myClass()->property)\n       
     || !$variable = myClass()->property2->method())\n        && false\n    ) 
{\n    }\n}\n"
+   "Parenthesized condition on multi-rows")
+
+  (phps-mode-test-indent--should-equal
+   "<?php\nif (true) {\n    require_once(myClass()->method1()\n        . 
'/hard-coded-file.php');\n}\n"
+   "Require once expression on multiple rows")
+
+  (phps-mode-test-indent--should-equal
+   "<?php\nif (true) {\n    $html .= 'My text'\n        . 'and more text';\n   
 foreach ($data as $key => $fields) {\n        $html .= '<strong>' . $key . 
'</strong>';\n        foreach ($fields as $key => $value) {\n            $html 
.= '<span>' . $value . '</span>';\n        }\n        $html .= '</ul></li>';\n  
  }\n    $html .= '</dd>';\n}\n"
+   "Two nested foreach loops containing string concatenation assignments")
 
   )
 



reply via email to

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