emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/phps-mode 3e1ff06 332/405: Added integration-tests for


From: Stefan Monnier
Subject: [elpa] externals/phps-mode 3e1ff06 332/405: Added integration-tests for syntax colouring and update goals
Date: Sat, 13 Jul 2019 10:00:43 -0400 (EDT)

branch: externals/phps-mode
commit 3e1ff066492b33c272c35d87018c7ea9230f66e9
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    Added integration-tests for syntax colouring and update goals
---
 README.md         | 5 +++--
 phps-mode-test.el | 9 +++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index f57f71c..25df1e9 100644
--- a/README.md
+++ b/README.md
@@ -15,8 +15,9 @@ This mode does not require PHP installed on computer because 
it has a elisp base
 * PSR-1 and PSR-2 indentation based on lexer tokens (100%)
 * Imenu support (100%)
 * Integration with (electric-pair) (100%)
-* Incremental lexer and syntax coloring after buffer changes (75%)
-* Incremental indentation and imenu calculation after buffer changes (50%)
+* Incremental lexer and syntax coloring after buffer changes (100%)
+* Incremental indentation and imenu calculation after buffer changes (100%)
+* Supports `(comment-region)` and `(uncomment-region)` (50%)
 * Wisent LALR parser based on official PHP yacc parser automatically converted 
grammar (50%)
 * Approach flycheck about including support for this module by default (0%)
 * Full integration with Emacs Semantic subsystem (30%)
diff --git a/phps-mode-test.el b/phps-mode-test.el
index c95027b..57da431 100644
--- a/phps-mode-test.el
+++ b/phps-mode-test.el
@@ -39,11 +39,13 @@
          (incremental-imenu nil)
          (incremental-indent nil)
          (incremental-buffer nil)
+         (incremental-overlays nil)
          (test-buffer-initial (generate-new-buffer "test-initial"))
          (initial-tokens nil)
          (initial-imenu nil)
          (initial-indent nil)
-         (initial-buffer nil))
+         (initial-buffer nil)
+         (initial-overlays nil))
 
      ;; Setup incremental buffer
      (switch-to-buffer test-buffer-incremental)
@@ -59,6 +61,7 @@
      (setq incremental-imenu (phps-mode-functions-get-imenu))
      (setq incremental-indent (phps-mode-test-hash-to-list 
(phps-mode-functions-get-lines-indent)))
      (setq incremental-buffer (buffer-substring-no-properties (point-min) 
(point-max)))
+     (setq incremental-overlays (overlays-in (point-min) (point-max)))
      (kill-buffer test-buffer-incremental)
 
      ;; Setup incremental buffer
@@ -73,18 +76,20 @@
      (setq initial-imenu (phps-mode-functions-get-imenu))
      (setq initial-indent (phps-mode-test-hash-to-list 
(phps-mode-functions-get-lines-indent)))
      (setq initial-buffer (buffer-substring-no-properties (point-min) 
(point-max)))
+     (setq initial-overlays (overlays-in (point-min) (point-max)))
      (kill-buffer test-buffer-initial)
 
      ;; Run tests
      (when (and (boundp 'phps-mode-functions-verbose)
                 phps-mode-functions-verbose)
-       (message "\nComparing tokens, lines indent and imenu between 
buffer:\n\n'%s'\n\nand:\n\n'%s'\n" initial-buffer incremental-buffer))
+       (message "\nComparing tokens, lines indent, imenu and overlays between 
buffer:\n\n'%s'\n\nand:\n\n'%s'\n" initial-buffer incremental-buffer))
      (should (equal initial-buffer incremental-buffer))
      ;; (message "Initial tokens: %s\n" initial-tokens)
      ;; (message "Incremental tokens: %s\n" incremental-tokens)
      (should (equal initial-tokens incremental-tokens))
      (should (equal initial-indent incremental-indent))
      (should (equal initial-imenu incremental-imenu))
+     (should (equal initial-overlays incremental-overlays))
 
      (when ,title
        (message "\nPassed incremental tests for '%s'\n" ,title))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]