[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed 6d53418 224/389: Add test for killing non-last subti
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed 6d53418 224/389: Add test for killing non-last subtitle |
Date: |
Fri, 3 Dec 2021 11:00:30 -0500 (EST) |
branch: elpa/subed
commit 6d53418aefdd973ffc9c392df614f75a34224a03
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>
Add test for killing non-last subtitle
---
tests/test-subed-srt.el | 42 ++++++++++++++++++++++++++++--------------
1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/tests/test-subed-srt.el b/tests/test-subed-srt.el
index 11107bb..6ac6664 100644
--- a/tests/test-subed-srt.el
+++ b/tests/test-subed-srt.el
@@ -929,20 +929,34 @@ Baz.
"2\n"
"00:02:02,234 -->
00:02:10,345\n"
"Bar.\n"))))
- (it "removes the previous subtitle when point is right above an ID."
- (with-temp-buffer
- (insert mock-srt-data)
- (subed-jump-to-subtitle-id 3)
- (backward-char)
- (expect (looking-at "^\n3\n") :to-be t)
- (subed-srt--subtitle-kill)
- (expect (buffer-string) :to-equal (concat "1\n"
- "00:01:01,000 -->
00:01:05,123\n"
- "Foo.\n"
- "\n"
- "3\n"
- "00:03:03,45 --> 00:03:15,5\n"
- "Baz.\n"))))
+ (describe "removes the previous subtitle when point is right above the ID"
+ (it "of the last subtitle."
+ (with-temp-buffer
+ (insert mock-srt-data)
+ (subed-jump-to-subtitle-id 3)
+ (backward-char)
+ (expect (looking-at "^\n3\n") :to-be t)
+ (subed-srt--subtitle-kill)
+ (expect (buffer-string) :to-equal (concat "1\n"
+ "00:01:01,000 -->
00:01:05,123\n"
+ "Foo.\n\n"
+ "3\n"
+ "00:03:03,45 -->
00:03:15,5\n"
+ "Baz.\n"))))
+ (it "of a non-last subtitle."
+ (with-temp-buffer
+ (insert mock-srt-data)
+ (subed-jump-to-subtitle-id 2)
+ (backward-char)
+ (expect (looking-at "^\n2\n") :to-be t)
+ (subed-srt--subtitle-kill)
+ (expect (buffer-string) :to-equal (concat "2\n"
+ "00:02:02,234 -->
00:02:10,345\n"
+ "Bar.\n\n"
+ "3\n"
+ "00:03:03,45 -->
00:03:15,5\n"
+ "Baz.\n"))))
+ )
)
(describe "Validating"
- [nongnu] elpa/subed afbdd42 206/389: Enable buttercup-minor-mode when opening test files, (continued)
- [nongnu] elpa/subed afbdd42 206/389: Enable buttercup-minor-mode when opening test files, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0c98c6d 208/389: avoid quoting lambdas (prevents byte-compilation), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0852968 210/389: adjust auto-mode-alist regexp match, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9fc0cbf 200/389: Remove mpv socket when stopping mpv, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 49e73c7 209/389: mark variable as unused with leading underscore, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 4195590 189/389: (unless ...) instead of (when (not ...) ...), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 8c3651f9 184/389: Remove alpha warning, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a42ba17 220/389: Simplify subed-srt--subtitle-kill, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed cefb54b 194/389: (unless ...) instead of (when (not ...) ...), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 769718c 212/389: Fix test for re-enabling point-to-player syncing, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6d53418 224/389: Add test for killing non-last subtitle,
ELPA Syncer <=
- [nongnu] elpa/subed e621108 219/389: Adjust subtitle killing test descriptions, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 06e9ce9 227/389: Make group in regexp-separator shy, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed f7f9fcf 226/389: Remove useless concat, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6e5a127 231/389: declare variables and functions that subed.el defines, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 56b2ff2 232/389: Move most of the insertion complexity to subed.el, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d3bc655 234/389: Update subed-default-subtitle-length docstring, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a1c150b 235/389: Update subed-subtitle-spacing docstring, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 43e8e91 236/389: Fix insert test, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c84e5cb 233/389: Rename *-subtitle-kill to *-kill-subtitle, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5f803d5 244/389: Add some missing tests, ELPA Syncer, 2021/12/03