[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 8c919ac 087/405: Added failing indentation te
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 8c919ac 087/405: Added failing indentation test |
Date: |
Sat, 13 Jul 2019 09:59:49 -0400 (EDT) |
branch: externals/phps-mode
commit 8c919ac9efc191ddf1b34a868c65eca158cc64ee
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added failing indentation test
---
README.md | 11 ++++++++++-
phps-test-functions.el | 8 ++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index dcfe3b5..9ed7f01 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,14 @@ With current progress estimates:
* Lexer based on official PHP re2c lexer (100%)
* Syntax coloring based on lexer tokens (100%)
* PSR based indentation based on lexer tokens (90%)
+* Incremental lexer and syntax coloring after buffer changes (75%)
* Wisent LALR parser based on official PHP yacc parser automatically converted
(60%)
-* Incremental lexer and syntax coloring after buffer changes (50%)
* Full integration with Emacs Semantic subsystem (30%)
* Flymake support (0%)
* PSR-2 auto-formatting tool based on lexer tokens (0%)
* Add to MELPA (0%)
* Add to ELPA (0%)
+* Travis support (0%)
## Unit tests
@@ -44,6 +45,14 @@ make test-parser
make test-functions
```
+### Integration tests
+
+Not working yet
+
+``` bash
+make test-integration
+```
+
### All tests
``` bash
diff --git a/phps-test-functions.el b/phps-test-functions.el
index f348e4d..cd7711a 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -145,6 +145,14 @@
(let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
(should (equal buffer-contents "<?php\nif (empty(\n$this->var\n) &&
!empty($this->var)\n) {\n$this->var = 'abc123';\n}\n"))))
+ (phps-mode/with-test-buffer
+ "<?php\nif (myFirstCondition()) {\n $this->var = 'abc123';\n } else
{\n $this->var = 'def456';\n}\n"
+ (goto-char 68)
+ (phps-mode/indent-line)
+ ;; (message "Tokens %s point %s" phps-mode/lexer-tokens (point))
+ (let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
+ (should (equal buffer-contents "<?php\nif (myFirstCondition()) {\n
$this->var = 'abc123';\n} else {\n $this->var = 'def456';\n}\n"))))
+
)
- [elpa] externals/phps-mode 94d4814 078/405: Added test for moving lexer tokens, (continued)
- [elpa] externals/phps-mode 94d4814 078/405: Added test for moving lexer tokens, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a59ef7b 079/405: More unit tests for moving lexer token positions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 287d934 077/405: Updated comments are made un-tested function for moving token positions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b3821a1 080/405: Updated TODOs, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f4cd90e 072/405: Updated readme and makefile for running all tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f79cf4f 081/405: Started on function for moving lexer states, Stefan Monnier, 2019/07/13
- [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 <=
- [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, 2019/07/13
- [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