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

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

[elpa] externals/phps-mode 434c3dc 089/405: Added more failing tests


From: Stefan Monnier
Subject: [elpa] externals/phps-mode 434c3dc 089/405: Added more failing tests
Date: Sat, 13 Jul 2019 09:59:49 -0400 (EDT)

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

    Added more failing tests
---
 phps-test-functions.el | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/phps-test-functions.el b/phps-test-functions.el
index 8eecbb8..ec7e899 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -161,6 +161,36 @@
    (let ((buffer-contents (buffer-substring-no-properties (point-min) 
(point-max))))
      (should (equal buffer-contents "<?php\nif (myFirstCondition()) {\n    
$this->var = 'abc123';\n} else if (mySeconCondition()) {\n    $this->var = 
'def456';\n}\n"))))
 
+  (phps-mode/with-test-buffer
+   "<?php\n$var = $var2->getHead()\n->getTail();\n"
+   (goto-char 35)
+   (phps-mode/indent-line)
+   (let ((buffer-contents (buffer-substring-no-properties (point-min) 
(point-max))))
+     (should (equal buffer-contents "<?php\n$var = $var2->getHead()\n    
->getTail();\n"))))
+
+  (phps-mode/with-test-buffer
+   "<?php\n$var =\n'random string';\n"
+   (goto-char 20)
+   (phps-mode/indent-line)
+   (let ((buffer-contents (buffer-substring-no-properties (point-min) 
(point-max))))
+     (should (equal buffer-contents "<?php\n$var =\n    'random string';\n"))))
+
+  (phps-mode/with-test-buffer
+   "<?php\nif (empty($this->var)):\n$this->var = 'abc123';\n    endif;"
+   (goto-char 60)
+   (phps-mode/indent-line)
+   (let ((buffer-contents (buffer-substring-no-properties (point-min) 
(point-max))))
+     (should (equal buffer-contents "<?php\nif 
(empty($this->var)):\n$this->var = 'abc123';\nendif;"))))
+
+  (phps-mode/with-test-buffer
+   "<?php\nif (empty($this->var)):\n$this->var = 'abc123';\n    endif;"
+   (goto-char 30)
+   (phps-mode/indent-line)
+   (let ((buffer-contents (buffer-substring-no-properties (point-min) 
(point-max))))
+     (should (equal buffer-contents "<?php\nif (empty($this->var)):\n    
$this->var = 'abc123';\n    endif;"))))
+
+  
+
 
   )
 



reply via email to

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