[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 6105e5d 226/405: Added a new failing test for
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 6105e5d 226/405: Added a new failing test for indetation |
Date: |
Sat, 13 Jul 2019 10:00:18 -0400 (EDT) |
branch: externals/phps-mode
commit 6105e5d65170bf88d6fd8a5dbef0a088183a1cf6
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added a new failing test for indetation
---
phps-mode-test-functions.el | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 6dbb63c..d284e7e 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -89,24 +89,48 @@
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
(phps-mode-test-with-buffer
+ "<?php\necho myFunction(\"A line\" .\n \"more text here\" .\n \"last
line here\");"
+ "Concatenated double-quoted-string spanning multiple-lines inside function"
+ ;; (message "Tokens: %s" phps-mode-lexer-tokens)
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
+
+ (phps-mode-test-with-buffer
"<?php\necho \"A line\"\n . \"more text here\"\n . \"last line
here\";"
"Concatenated double-quoted-string spanning multiple-lines 2"
;; (message "Tokens: %s" phps-mode-lexer-tokens)
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
(phps-mode-test-with-buffer
+ "<?php\necho myFunction(\"A line\" .\n \"more text here\" .\n \"last
line here\");"
+ "Concatenated double-quoted-string spanning multiple-lines inside function
2"
+ ;; (message "Tokens: %s" phps-mode-lexer-tokens)
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
+
+ (phps-mode-test-with-buffer
"<?php\necho 'A line' .\n 'more text here' .\n 'last line here';"
"Concatenated single-quoted-string spanning multiple-lines"
;; (message "Tokens: %s" phps-mode-lexer-tokens)
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
(phps-mode-test-with-buffer
+ "<?php\necho myFunction('A line' .\n 'more text here' .\n 'last line
here');"
+ "Concatenated single-quoted-string spanning multiple-lines inside function"
+ ;; (message "Tokens: %s" phps-mode-lexer-tokens)
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
+
+ (phps-mode-test-with-buffer
"<?php\necho 'A line'\n . 'more text here'\n . 'last line here';"
"Concatenated single-quoted-string spanning multiple-lines 2"
;; (message "Tokens: %s" phps-mode-lexer-tokens)
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
(phps-mode-test-with-buffer
+ "<?php\necho myFunction('A line'\n . 'more text here'\n . 'last line
here');"
+ "Concatenated single-quoted-string spanning multiple-lines inside function
2"
+ ;; (message "Tokens: %s" phps-mode-lexer-tokens)
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (1 0)))
(phps-mode-test-functions--hash-to-list
(phps-mode-functions-get-lines-indent)))))
+
+ (phps-mode-test-with-buffer
"<?php\necho <<<EOD\nExample of string\nspanning multiple lines\nusing
heredoc syntax.\nEOD;\n"
"Multi-line HEREDOC string outside assignment"
;; (message "Tokens: %s" phps-mode-lexer-tokens)
@@ -559,7 +583,7 @@
(defun phps-mode-test-functions ()
"Run test for functions."
;; (setq debug-on-error t)
- ;; (setq phps-mode-functions-verbose t)
+ (setq phps-mode-functions-verbose t)
(phps-mode-test-functions-get-lines-lindent-if)
(phps-mode-test-function-get-lines-indent-classes)
(phps-mode-test-functions-get-lines-indent-inline-if)
- [elpa] externals/phps-mode d18fddc 175/405: Fixed bug with indentation for indented doc-comments, (continued)
- [elpa] externals/phps-mode d18fddc 175/405: Fixed bug with indentation for indented doc-comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 00c0ab9 194/405: Nesting-stack algorithm handles class declaration indents, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8a76039 189/405: Started implementing nesting-stack, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode cf7dc07 210/405: Preparations for multi-line quoted indentation tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 208a788 208/405: Re-organized indent tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c678fc1 209/405: New algorithm handles HEREDOC indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b6cf3a4 191/405: Started on new algorithm for indentation calculation based on stack, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b2338cd 223/405: All tests for indentation passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7a4b98e 215/405: More work on algorithm description, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9031c3a 211/405: Merge branch 'master' of https://github.com/cjohansson/emacs-phps-mode, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6105e5d 226/405: Added a new failing test for indetation,
Stefan Monnier <=
- [elpa] externals/phps-mode 5f445cd 229/405: Fixed indentation for while expressions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode eb0ee5e 236/405: Updated README with imenu-support, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 811c499 220/405: New algorithm now works for switch, case syntax, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d2e5a03 228/405: Updated indentation algorithm document and README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1aa0f90 238/405: Typo in README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode da1cfd5 231/405: Adding failing lexer test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e6a8944 241/405: Started work on a lexer bug with expressions inside double quoted strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 0c49d6d 243/405: Removed debugging output, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 95ac15a 245/405: Imenu index now handles class extends and implements, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 67233ef 213/405: Fixed indent algorithm for multi-line strings, Stefan Monnier, 2019/07/13