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

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

[elpa] externals/phps-mode d416443 371/405: Added more test for moving l


From: Stefan Monnier
Subject: [elpa] externals/phps-mode d416443 371/405: Added more test for moving line-indent index
Date: Sat, 13 Jul 2019 10:00:53 -0400 (EDT)

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

    Added more test for moving line-indent index
---
 phps-mode-test-functions.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index ec9c7a6..5395c19 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -44,12 +44,24 @@
 
   (phps-mode-test-with-buffer
    "<?php\n/**\n * Bla\n */"
+   "Move line-indents zero lines down"
+   (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 1)) (4 (0 1))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent))))
+   (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 1)) (4 (0 1))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-moved-lines-indent 
(phps-mode-functions-get-lines-indent) 2 0)))))
+
+  (phps-mode-test-with-buffer
+   "<?php\n/**\n * Bla\n */"
    "Move line-indents one line down"
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 1)) (4 (0 1))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent))))
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 0)) (4 (0 1)) (5 (0 1))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-moved-lines-indent 
(phps-mode-functions-get-lines-indent) 2 1)))))
 
   (phps-mode-test-with-buffer
    "<?php\n/**\n * Bla\n */"
+   "Move line-indents two lines down"
+   (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 1)) (4 (0 1))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent))))
+   (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 0)) (4 (0 0)) (5 (0 1)) (6 (0 
1))) (phps-mode-test-hash-to-list (phps-mode-functions-get-moved-lines-indent 
(phps-mode-functions-get-lines-indent) 2 2)))))
+
+  (phps-mode-test-with-buffer
+   "<?php\n/**\n * Bla\n */"
    "Move line-indents one line up"
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 1)) (4 (0 1))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent))))
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (0 1))) 
(phps-mode-test-hash-to-list (phps-mode-functions-get-moved-lines-indent 
(phps-mode-functions-get-lines-indent) 3 -1)))))



reply via email to

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