[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode c4ee0c3 132/405: Added more failing tests
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode c4ee0c3 132/405: Added more failing tests |
Date: |
Sat, 13 Jul 2019 09:59:59 -0400 (EDT) |
branch: externals/phps-mode
commit c4ee0c3a435bb362dfa78768c9ef04b6b355e467
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added more failing tests
---
phps-mode-test-functions.el | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 986f0eb..7e20de7 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -34,7 +34,7 @@
(autoload 'phps-mode-functions-get-point-data "phps-mode-functions")
(autoload 'should "ert")
-;; TODO Add unit tests for HEREDOC, NOWDOC as well
+;; TODO Add unit tests for HEREDOC and NOWDOC regions as well
(defun phps-mode-test-functions-indent-line ()
"Test for indentation."
@@ -245,11 +245,6 @@
)
-
-;; TODO Support inline control structures for: if, while, for, foreach, and
switch
-;; TODO Support alternative syntax for control structures for: if, while, for,
foreach, and switch
-
-
(defun phps-mode-test-functions-get-point-data ()
"Return information about point in tokens."
@@ -333,7 +328,7 @@
(goto-char 46)
(should (equal (list (list t 0 0 2 0 0 6 nil) (list t 0 0 2 0 0 8 nil))
(phps-mode-functions-get-point-data))))
- ;; INLINE SYNTAX
+ ;; INLINE SYNTAX FOR CONTROL STRUCTURES
(phps-mode-test-with-buffer
"<?php\nif ($myCondition)\n echo 'was here';\necho 'was here 2';\n"
@@ -365,7 +360,12 @@
(goto-char 57)
(should (equal (list (list t 0 0 0 1 0 8 nil) (list t 0 0 0 0 0 11 nil))
(phps-mode-functions-get-point-data))))
- ;; ALTERNATIVE SYNTAX
+ (phps-mode-test-with-buffer
+ "<?php\nif ($myCondition)\n echo 'was here';\nelse\n echo 'was here
2';\n"
+ (goto-char 55)
+ (should (equal (list (list t 0 0 0 1 0 8 nil) (list t 0 0 0 0 0 11 nil))
(phps-mode-functions-get-point-data))))
+
+ ;; ALTERNATIVE SYNTAX FOR CONTROL STRUCTURES
(phps-mode-test-with-buffer
"<?php\nif ($myCondition):\n echo 'was here';\nendif;\necho 'was here
2';\n"
@@ -393,9 +393,16 @@
(should (equal (list (list t 0 0 0 0 1 5 nil) (list t 0 0 0 0 1 8 nil))
(phps-mode-functions-get-point-data))))
(phps-mode-test-with-buffer
- "<?php\nif ($myCondition)\n echo 'was here';\nelse\n echo 'was here
2';\n"
- (goto-char 55)
- (should (equal (list (list t 0 0 0 1 0 8 nil) (list t 0 0 0 0 0 11 nil))
(phps-mode-functions-get-point-data))))
+ "<?php\nif ($myCondition):\n echo 'was here';\nelse:\n echo 'was here
2';\nendif;\n"
+ (goto-char 64)
+ (should (equal (list (list t 0 0 0 0 1 10 nil) (list t 0 0 0 0 1 13 nil))
(phps-mode-functions-get-point-data))))
+
+ (phps-mode-test-with-buffer
+ "<?php\nif ($myCondition):\n echo 'was here';\nelse:\n echo 'was here
2';\nendif;\n"
+ (goto-char 79)
+ (should (equal (list (list t 0 0 0 0 0 10 nil) (list t 0 0 0 0 0 15 nil))
(phps-mode-functions-get-point-data))))
+
+ ;; TODO SWITCH, CASE, DEFAULT AS WELL
)
- [elpa] externals/phps-mode f0523b7 137/405: More work on new function to calculate indentation, (continued)
- [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, 2019/07/13
- [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 <=
- [elpa] externals/phps-mode 0b3ced4 145/405: First test for new indentation function passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 96588b5 142/405: More work on new indentation calculation functions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9d6af11 157/405: More work on indentations, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e249124 152/405: Prevent negative indent, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4a27c44 147/405: Added support for naming unit tests to better find failures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b852f5f 160/405: All tests for indentation passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dfb0427 151/405: Added unit test for round and square bracket expressions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7b8cea3 163/405: Added failing indentation test for class multiple implements, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a61ff64 134/405: Renamed function get-point-data to get-current-line-data for better semantics, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b99da6b 153/405: Starting using new indentation calculation for indentations, Stefan Monnier, 2019/07/13