[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 16d8056 144/405: Foundation for new indentati
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 16d8056 144/405: Foundation for new indentation tests completed |
Date: |
Sat, 13 Jul 2019 10:00:01 -0400 (EDT) |
branch: externals/phps-mode
commit 16d80562391d6778223183eaa3bfe80458a6e51b
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Foundation for new indentation tests completed
---
phps-mode-test-functions.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index f8d39ab..31fe1ac 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -36,6 +36,15 @@
(autoload 'hash-table-values "subr-x")
(autoload 'should "ert")
+(defun phps-mode-test-functions--hash-to-list (hash-table)
+ "Return a list that represent the HASH-TABLE. Each element is a list: (list
key value)."
+ (let (result)
+ (maphash
+ (lambda (k v)
+ (push (list k v) result))
+ hash-table)
+ (nreverse result)))
+
(defun phps-mode-test-functions-get-lines-indent ()
"Test `phps-mode-functions-get-lines-indent' function."
@@ -44,7 +53,7 @@
(phps-mode-test-with-buffer
"<html><head><title><?php\nif ($myCondition) {\nif ($mySeconCondition)
{\necho $title;\n}\n} ?></title><body>Bla bla</body></html>"
(goto-char 15)
- (should (equal '((0 0) (0 0) (1 0) (2 0) (1 0) (0 0)) (hash-table-values
(phps-mode-functions-get-lines-indent)))))
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (1 0)) (6 (0
0))) (phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
(phps-mode-test-with-buffer
"<html><head><title><?php\nif ($myCondition) {\nif ($mySeconCondition)
{\necho $title;\n\n} ?></title><body>Bla bla</body></html>"
- [elpa] externals/phps-mode 60c7431 122/405: Unit tests for gather data about inline and alternative control structure syntax passes, (continued)
- [elpa] externals/phps-mode 60c7431 122/405: Unit tests for gather data about inline and alternative control structure syntax passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 897f249 124/405: Work on alternative and inline indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode be35ed6 127/405: Added sample files for inline and alternative control structures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7279913 113/405: Improved TODOs, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a8eadfa 130/405: Improved sample files inline and alternative control structures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9996ae0 146/405: More work on indentation calculation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3776841 138/405: Added new support for tracking doc-comment, HEREDOC and NOWDOC indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 780d065 125/405: Code styling updates, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 314dba1 135/405: Improved articulation of what information get-current-line-data should return, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f0523b7 137/405: More work on new function to calculate indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 16d8056 144/405: Foundation for new indentation tests completed,
Stefan Monnier <=
- [elpa] externals/phps-mode d380cd4 129/405: Updated readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3f08b86 128/405: Updated tracking of alternative control structures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 52c502c 139/405: Improved logic for doc-comment tracking, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1472273 136/405: Begun working on new approach to indentation calculation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9792f70 133/405: Cleaning up code gather point meta information, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode cc947a9 140/405: Added more tests for new indentation function, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d3e00f2 141/405: Starting on new function for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c68c7a0 131/405: Fixed issue were first-token-on-line was nil, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c4ee0c3 132/405: Added more failing tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 0b3ced4 145/405: First test for new indentation function passes, Stefan Monnier, 2019/07/13