[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode c80aa68 351/405: Added a new failing test for
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode c80aa68 351/405: Added a new failing test for indentation of else expression inside switch |
Date: |
Sat, 13 Jul 2019 10:00:47 -0400 (EDT) |
branch: externals/phps-mode
commit c80aa68ea3a5a97813b72f941673a72100cd0c78
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added a new failing test for indentation of else expression inside switch
---
phps-mode-test-functions.el | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 470a686..471e512 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -203,6 +203,11 @@
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (1 0)) (6 (0
0))) (phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
(phps-mode-test-with-buffer
+ "<?php\nswitch ($condition) {\n case 34:\n if ($item['Random'] %
10 == 0) {\n $attributes['item'] = ($item['IntegerValue'] / 10);\n
} else {\n $attributes['item'] =\n
number_format(($item['IntegerValue'] / 10), 1, '.', '');\n }\n
break;\n}\n"
+ "Switch case with conditional modulo expression"
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (3 0)) (6 (2
0)) (7 (3 0)) (8 (4 0)) (9 (3 0)) (10 (3 0)) (11 (0 0)))
(phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
+
+ (phps-mode-test-with-buffer
"<?php\n$options = array(\n 'options' => array(array(\n
'errorTo'\n ))\n);"
"Assignment with three-dimensional array with double arrow assignment"
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (1 0)) (6 (0
0))) (phps-mode-test-hash-to-list (phps-mode-functions-get-lines-indent)))))
@@ -847,16 +852,6 @@
(should (equal buffer-contents "<?php\nnamespace myNamespace;\nclass
myClass extends myAbstract implements myInterface {\n public function
myFunctionA($myArg = null) {}\n protected function myFunctionB($myArg =
'abc') {}\n}\n"))))
)
-;; TODO Add test for this:
- ;; case 34:
- ;; if ($item['IntegerValue'] % 10 == 0) {
- ;; $attributes['boat']['Effekt (hk)'] =
($item['IntegerValue'] / 10);
- ;; } else {
- ;; $attributes['boat']['Effekt (hk)'] =
- ;; number_format(($item['IntegerValue'] / 10),
1, '.', '');
- ;; }
- ;; break;
-
(defun phps-mode-test-functions ()
"Run test for functions."
- [elpa] externals/phps-mode c37b234 334/405: Added failing test for indent in concatenated string inside function arguments, (continued)
- [elpa] externals/phps-mode c37b234 334/405: Added failing test for indent in concatenated string inside function arguments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8109c1a 328/405: (uncomment-region) working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9e62157 338/405: (comment-region) and (uncomment-region) now handles part of lines as well as full lines, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 091ab21 340/405: Passes new unit test for indentation of concatenated equal and multiplication equal assignments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d27af61 327/405: Fixed bug with incremental lexer were states are missing, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 32f9808 329/405: indent and imenu now triggers incremental lexer if buffer changed, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 365d739 324/405: Changed structure of integration tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2807902 343/405: Added syntax coloring for %, =, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1bac28a 352/405: Updated readme with decreased percent for indent, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2801604 350/405: Added TODO item, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c80aa68 351/405: Added a new failing test for indentation of else expression inside switch,
Stefan Monnier <=
- [elpa] externals/phps-mode a8fbe7d 344/405: Improved syntax coloring of =, % and more, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 64e1789 356/405: Fixed indentation were assignments end at next line, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 83d5de8 355/405: Removed uneccesary debug output in unit test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode abd78a0 359/405: Work on incremental newline logic, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d8ad25b 341/405: Passes new test indentation of multi-line double-arrow inside assignment, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e7cb803 346/405: Added another indentation test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dabe0ea 345/405: Added failing indentation test for multi-dimension array in assignment with double arrows, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d6e6cbc 358/405: Another optimization of line-number-at-pos inside loop, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e681c9c 347/405: Updated color syntax for T_STRING tokens, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c11bcc5 360/405: More work on newline advice, Stefan Monnier, 2019/07/13