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

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

[nongnu] elpa/subed 191f301553 7/9: test-subed-vtt: Add test for sorting


From: ELPA Syncer
Subject: [nongnu] elpa/subed 191f301553 7/9: test-subed-vtt: Add test for sorting from the header.
Date: Tue, 28 Nov 2023 19:00:29 -0500 (EST)

branch: elpa/subed
commit 191f301553aa5ca2b7d6350116ed6c0198e4140c
Author: Sacha Chua <sacha@sachachua.com>
Commit: Sacha Chua <sacha@sachachua.com>

    test-subed-vtt: Add test for sorting from the header.
    
    * tests/test-subed-vtt.el: Add test for sorting from the header.
      Also tweak wording of other tests.
---
 tests/test-subed-vtt.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/test-subed-vtt.el b/tests/test-subed-vtt.el
index 22b3a23179..159443b84a 100644
--- a/tests/test-subed-vtt.el
+++ b/tests/test-subed-vtt.el
@@ -1489,8 +1489,8 @@ Subtitle 2")
                 "\n"
                 "00:12:01.000 --> 00:01:05.123\n"
                 "Foo.\n"))))
-    (describe "preserves point in the current subtitle"
-      (it "when subtitle text is non-empty."
+    (describe "point preservation"
+      (it "works when subtitle text is non-empty."
         (with-temp-vtt-buffer
          (insert mock-vtt-data)
          (goto-char (point-min))
@@ -1500,15 +1500,19 @@ Subtitle 2")
          (expect (current-word) :to-equal "Foo")
          (subed-sort)
          (expect (current-word) :to-equal "Foo")))
-      (it "when subtitle text is empty."
+      (it "works when subtitle text is empty."
         (with-temp-vtt-buffer
          (insert "WEBVTT\n\n00:12:01.000 --> 00:01:05.123\n")
          (let ((pos (point)))
            (subed-sort)
            (expect (buffer-string) :to-equal "WEBVTT\n\n00:12:01.000 --> 
00:01:05.123\n\n")
            (expect (point) :to-equal pos))))
-      )
-    )
+      (it "works in the header."
+        (with-temp-vtt-buffer
+         (insert mock-vtt-data)
+         (goto-char (point-min))
+         (subed-sort)
+         (expect (point) :to-equal (point-min))))))
   (describe "Converting msecs to timestamp"
     (it "uses the right format"
       (with-temp-vtt-buffer



reply via email to

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