[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode f7f931a 092/405: Added another failing indent
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode f7f931a 092/405: Added another failing indentation test |
Date: |
Sat, 13 Jul 2019 09:59:50 -0400 (EDT) |
branch: externals/phps-mode
commit f7f931a5049f4284d28185e36d5faa8113867d16
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added another failing indentation test
---
phps-mode.el | 2 +-
phps-test-functions.el | 14 +++++++++-----
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/phps-mode.el b/phps-mode.el
index cc4a714..58eec94 100644
--- a/phps-mode.el
+++ b/phps-mode.el
@@ -60,7 +60,7 @@
(defvar phps-mode/use-psr-2 t
"Whether to use PSR-2 guidelines for white-space or not.")
-(defvar phps-mode/idle-interval 1
+(defvar phps-mode/idle-interval 0.2
"Idle seconds before running incremental lexer.")
(define-derived-mode phps-mode prog-mode "PHPs"
diff --git a/phps-test-functions.el b/phps-test-functions.el
index f9974a6..523641f 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -162,11 +162,18 @@
(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\nmyFunction(\n array(\n 'random' => 'abc',\n ),\n
$var2\n);\n"
+ "<?php\nif (myRandomCondition()):\necho 'Something here';\n echo
'Something else here';\nendif;\n"
+ (goto-char 40)
+ (phps-mode/indent-line)
+ (let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
+ (should (equal buffer-contents "<?php\nif (myRandomCondition()):\n
echo 'Something here';\n echo 'Something else here';\nendif;\n"))))
+
+ (phps-mode/with-test-buffer
+ "<?php\nmyFunction(\n array(\n 'random' => 'abc',\n ),\n
$var2\n);\n"
(goto-char 50)
(phps-mode/indent-line)
(let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
- (should (equal buffer-contents "<?php\nmyFunction(\n array(\n
'random' => 'abc',\n ),\n $var2\n);\n"))))
+ (should (equal buffer-contents "<?php\nmyFunction(\n array(\n
'random' => 'abc',\n ),\n $var2\n);\n"))))
(phps-mode/with-test-buffer
"<?php\n$var = $var2->getHead()\n->getTail();\n"
@@ -196,9 +203,6 @@
(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;"))))
-
-
-
)
(defun phps-mode/test-functions--get-point-data ()
- [elpa] externals/phps-mode e340279 082/405: Added unit tests for moving lexer-state positions, (continued)
- [elpa] externals/phps-mode e340279 082/405: Added unit tests for moving lexer-state positions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 89b12ab 084/405: Added autoloads and fixed bug with assigning variable, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a10cc79 085/405: Debugging a indentation case, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e30ac0c 083/405: Started implementation of moving lexer and state position when, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8c919ac 087/405: Added failing indentation test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 69ced0d 090/405: Added another unit test for failed indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f2f41a3 088/405: Handles indentation case with } else if (...) {, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 59ba835 086/405: Fixed issue with wrong indentation at trailing opening brace, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 434c3dc 089/405: Added more failing tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 61abf7e 091/405: Added todo item, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f7f931a 092/405: Added another failing indentation test,
Stefan Monnier <=
- [elpa] externals/phps-mode a8561ab 096/405: Updated unit test for get-point-data with support for square brackets, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dbc02bb 099/405: Improved syntax table, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 989cc7e 098/405: Fixed flycheck warning about semantic, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c5beb50 093/405: Added another unit test for indentation with special syntax, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3740660 095/405: Get point-data now collects information about square brackets, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6c8eea0 100/405: Added another failing indentation case for switch case, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a899707 102/405: Updated comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 89fac0b 094/405: Added another unit test for bracket less conditional, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6ac718c 104/405: Removed non-breaking space from syntax table, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a5beef1 097/405: Added support for square bracket indentation, Stefan Monnier, 2019/07/13