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

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

[nongnu] elpa/buttercup 4159111 275/340: test: Verify full line for repo


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup 4159111 275/340: test: Verify full line for reporter spec-done tests
Date: Thu, 16 Dec 2021 14:59:49 -0500 (EST)

branch: elpa/buttercup
commit 415911132c0d0414d71291dcaaab36076f3554a7
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    test: Verify full line for reporter spec-done tests
    
    The batch reporter splits output of specs between spec-started and
    spec-done, and in the spec-done tests the full line has to be verified
    to make sure that any control characters (\r,\t,\b,\n ...) has been
    used correctly.  spec-started still has to be verified separately for
    text that should be displayed before the test is actually run, as the
    spec description shall be displayed while running the test.
---
 tests/test-buttercup.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 474da8d..7f051be 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -1109,27 +1109,30 @@ text properties using `ansi-color-apply'."
         (buttercup--set-start-time spec)
         (setf (buttercup-spec-failure-description spec) "DONTSHOW")
         (buttercup--set-end-time spec)
+        (buttercup-reporter-batch 'spec-started spec)
         (buttercup-reporter-batch 'spec-done spec)
         (expect (buttercup-output) :to-equal
-                (format " (%s)\n" (buttercup-elapsed-time-string spec)))
-        )
+                (format "    spec (%s)\n"
+                        (buttercup-elapsed-time-string spec))))
 
       (it "should say FAILED for a failed spec"
         (setf (buttercup-spec-status spec) 'failed)
         (let ((buttercup-reporter-batch--failures nil))
+          (buttercup-reporter-batch 'spec-started spec)
           (buttercup-reporter-batch 'spec-done spec))
         (expect (buttercup-output) :to-equal
-                (format "  FAILED (%s)\n" (buttercup-elapsed-time-string 
spec)))
-        )
+                (format "    spec  FAILED (%s)\n"
+                        (buttercup-elapsed-time-string spec))))
 
       (it "should output the failure-description for a pending spec"
         (setf (buttercup-spec-status spec) 'pending
               (buttercup-spec-failure-description spec) "DESCRIPTION")
         (let ((buttercup-reporter-batch--failures nil))
+          (buttercup-reporter-batch 'spec-started spec)
           (buttercup-reporter-batch 'spec-done spec))
         (expect (buttercup-output) :to-equal
-                (format "  DESCRIPTION (%s)\n" (buttercup-elapsed-time-string 
spec)))
-        )
+                (format "    spec  DESCRIPTION (%s)\n"
+                        (buttercup-elapsed-time-string spec))))
 
       (it "should throw an error for an unknown spec status"
         (setf (buttercup-spec-status spec) 'unknown)



reply via email to

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