[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 9db28d9 185/405: Added verbose flag for unit
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 9db28d9 185/405: Added verbose flag for unit tests |
Date: |
Sat, 13 Jul 2019 10:00:09 -0400 (EDT) |
branch: externals/phps-mode
commit 9db28d9ae6d57255c1d8c50294566be012d34487
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added verbose flag for unit tests
---
phps-mode-functions.el | 10 ++++++++--
phps-mode-test-functions.el | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/phps-mode-functions.el b/phps-mode-functions.el
index d4b833f..09deb3b 100644
--- a/phps-mode-functions.el
+++ b/phps-mode-functions.el
@@ -34,6 +34,10 @@
(defvar phps-mode-functions-lines-indent nil
"The indentation of each line in buffer, nil if none.")
+(defvar phps-mode-functions-verbose nil
+ "Verbose messaging, default nil.")
+
+
;; NOTE Also format white-space inside the line, i.e. after function
declarations?
;; TODO Add support for automatic parenthesis, bracket, square-bracket,
single-quote and double-quote encapsulations
@@ -44,7 +48,8 @@
(if (boundp 'phps-mode-lexer-tokens)
(save-excursion
(goto-char (point-min))
- (message "\nCalculation indentation for all lines in buffer:\n\n%s"
(buffer-substring-no-properties (point-min) (point-max)))
+ (when phps-mode-functions-verbose
+ (message "\nCalculation indentation for all lines in buffer:\n\n%s"
(buffer-substring-no-properties (point-min) (point-max))))
(let ((in-scripting nil)
(in-heredoc nil)
(in-inline-control-structure nil)
@@ -337,7 +342,8 @@
(setq column-level-start (1+ column-level-start))))
- (message "Process line ending. nesting: %s-%s,
line-number: %s-%s, indent: %s.%s, token: %s" nesting-start nesting-end
token-start-line-number token-end-line-number column-level-start tuning-level
token)
+ (when phps-mode-functions-verbose
+ (message "Process line ending. nesting: %s-%s,
line-number: %s-%s, indent: %s.%s, token: %s" nesting-start nesting-end
token-start-line-number token-end-line-number column-level-start tuning-level
token))
;; (message "new line %s or last token at %s, %s %s.%s
(%s - %s) = %s %s %s %s %s [%s %s] %s %s %s" token-start-line-number token
next-token column-level tuning-level nesting-start nesting-end
round-bracket-level square-bracket-level curly-bracket-level
alternative-control-structure-level inline-control-structure-level
first-token-is-nesting-decrease first-token-is-nesting-increase in-assignment
in-assignment-level in-class-declaration-level)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 8147892..f3bdf87 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -30,10 +30,9 @@
(autoload 'phps-mode-test-with-buffer "phps-mode-test")
+(autoload 'phps-mode-functions-verbose "phps-mode-functions")
(autoload 'phps-mode-functions-indent-line "phps-mode-functions")
(autoload 'phps-mode-functions-get-lines-indent "phps-mode-functions")
-(autoload 'phps-mode-functions-get-current-line-data "phps-mode-functions")
-(autoload 'hash-table-values "subr-x")
(autoload 'should "ert")
(defun phps-mode-test-functions--hash-to-list (hash-table)
@@ -439,6 +438,7 @@
(defun phps-mode-test-functions ()
"Run test for functions."
+ (setq phps-mode-functions-verbose t)
(phps-mode-test-functions-get-lines-indent)
(phps-mode-test-functions-indent-line))
- [elpa] externals/phps-mode 1bc5713 227/405: New tests for concatenation passes, (continued)
- [elpa] externals/phps-mode 1bc5713 227/405: New tests for concatenation passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c71a97d 178/405: Started on refactored indentation calculation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8bb3918 249/405: Clean-up of unit test logging, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9201d1c 246/405: Imenu index now handles functions with optional arguments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2c3239a 187/405: Adding new failing tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d9a0119 183/405: Optimized indentation code by removing unused variables, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a0cbcd1 186/405: More work on indentation of multi-line IF-expressions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d7c5f67 190/405: More work on nesting-stack, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 253839f 170/405: Added indentation unit tests for concatenated strings outside assignments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e38794b0 197/405: More conceptual work on algorithm for inline control structures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9db28d9 185/405: Added verbose flag for unit tests,
Stefan Monnier <=
- [elpa] externals/phps-mode 2a1ed52 196/405: Optimized algorithm for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a30c3f6 177/405: More work on indentation tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e8a8d41 204/405: Merged remote changes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode faa4e00 201/405: Started on conceptually describing algorithm for multi-line assignment indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 874701d 195/405: Work on alternative and inline control structure syntax with new algorithm, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ec69d07 193/405: Added a failing class declaration indentation case, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 164b77e 205/405: Unit test for alternative control syntax passes with new algorithm, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e8658c8 192/405: New indentation algorithm now passes class unit tests, started on indentation document, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ba9d8a0 199/405: More organization of tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 86404c8 207/405: New algorithm now passes tests for alternative control structure, Stefan Monnier, 2019/07/13