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

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

[nongnu] elpa/haskell-tng-mode 50b53d3 114/385: tng compilation tests


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode 50b53d3 114/385: tng compilation tests
Date: Tue, 5 Oct 2021 23:59:12 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit 50b53d397dc28c64b0dce06eb1b9fc63249adb44
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    tng compilation tests
---
 Cask                             |  1 -
 test/haskell-tng-compile-test.el | 23 ++++++++++-------------
 2 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/Cask b/Cask
index 7831baf..13a428a 100644
--- a/Cask
+++ b/Cask
@@ -26,7 +26,6 @@
 
 (development
  (depends-on "faceup")
- (depends-on "haskell-mode") ;; regression testing
  (depends-on "ert-runner")
  (depends-on "undercover"))
 
diff --git a/test/haskell-tng-compile-test.el b/test/haskell-tng-compile-test.el
index fe0e775..8f214cf 100644
--- a/test/haskell-tng-compile-test.el
+++ b/test/haskell-tng-compile-test.el
@@ -7,8 +7,6 @@
 (require 'dash)
 (require 'faceup)
 
-(require 'haskell-compile)
-
 (require 'haskell-tng-mode)
 (require 'haskell-tng-testutils
          "test/haskell-tng-testutils.el")
@@ -16,38 +14,37 @@
 (defun have-expected-errors (file)
   (with-temp-buffer
     (let ((output (current-buffer))
-          ;; compilation-mode uses font-lock-face, not face
           (faceup-default-property 'font-lock-face)
-          ;; maybe add compilation-message ?
-          ;; maybe add overlays ?
           (faceup-properties '(font-lock-face)))
       (compilation-start
        (format "cat %s" file)
-       'haskell-compilation-mode
+       'haskell-tng-compilation-mode
        (lambda (_) output))
 
       (while compilation-in-progress
         (sit-for 0.01))
       (haskell-tng-compile:clean-output)
 
-      ;; (font-lock-fontify-region (point-min) (point-max))
-      ;; (--dotimes (point-max)
-      ;;   (let ((p (+ 1 it)))
-      ;;     (message "POINT=%s PROPS=%S" p (text-properties-at p))))
-
       (haskell-tng-testutils:assert-file-contents
        file
        output
        #'buffer-to-faceup-string
        "faceup"))))
 
+;; TODO locally scope this override to this test. Would also be good to 
override
+;;      abbreviate-file-name and current-time-string
+(defun compilation-handle-exit (_1 _2 _3)
+  "Overrides the default behaviour to remove noise")
+
 (defun haskell-tng-compile:clean-output ()
   "Removes timestamps and local file paths"
   (let ((inhibit-read-only t))
     (goto-char (point-min))
     (kill-line 4)
-    (goto-char (point-max))
-    (kill-line -2)))
+    ;; not needed with the custom compilation-handle-exit
+    ;;(goto-char (point-max))
+    ;;(kill-line -2)
+    ))
 
 ;; to generate .faceup files, use faceup-view-buffer
 (ert-deftest haskell-tng-compile-errors-file-tests ()



reply via email to

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