[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed c895b91 012/389: Add test for sanitizing on empty su
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed c895b91 012/389: Add test for sanitizing on empty subtitle texts |
Date: |
Fri, 3 Dec 2021 10:59:47 -0500 (EST) |
branch: elpa/subed
commit c895b916883dcca3d9cd4648788b277da36bb9dc
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>
Add test for sanitizing on empty subtitle texts
---
tests/test-subed-srt.el | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/tests/test-subed-srt.el b/tests/test-subed-srt.el
index d6b84ef..2e26458 100644
--- a/tests/test-subed-srt.el
+++ b/tests/test-subed-srt.el
@@ -488,14 +488,22 @@ Baz.
"3\n"
"00:12:01,000 --> 00:01:05,123\n"
"Foo.\n"))))
- (it "preserves point in the current subtitle."
- (with-temp-buffer
- (insert mock-srt-data)
- (goto-char (point-min))
- (re-search-forward "01:01")
- (replace-match "12:01")
- (search-forward "\n")
- (expect (current-word) :to-equal "Foo")
- (subed-srt-sort)
- (expect (current-word) :to-equal "Foo")))
+ (describe "preserves point in the current subtitle"
+ (it "when subtitle text is non-empty."
+ (with-temp-buffer
+ (insert mock-srt-data)
+ (goto-char (point-min))
+ (re-search-forward "01:01")
+ (replace-match "12:01")
+ (search-forward "\n")
+ (expect (current-word) :to-equal "Foo")
+ (subed-srt-sort)
+ (expect (current-word) :to-equal "Foo")))
+ (it "when subtitle text is empty."
+ (with-temp-buffer
+ (insert "1\n00:12:01,000 --> 00:01:05,123\n")
+ (goto-char (point-max))
+ (subed-srt-sort)
+ (expect (point) :to-equal 33)))
+ )
)
- [nongnu] elpa/subed f8a7c6a 029/389: Fix test that failed because of lexical scoping, (continued)
- [nongnu] elpa/subed f8a7c6a 029/389: Fix test that failed because of lexical scoping, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b3f2776 032/389: Adjust some test descriptions and apply cosmetics, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 4b16d97 033/389: Trying to do more resilient srt parsing, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 63f0ef5 040/389: In general, subtitle separator must be two or more newlines, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 52ee2ac 006/389: Be more robust when getting subtitle's relative point, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5131bc4 009/389: Add subed-srt-forward/backward-subtitle-end functions, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c04670a 007/389: Adjust some docstrimgs, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c5dcb73 010/389: Make closing parens spoon each other, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 8a39911 024/389: Use let instead of setq, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 78d3855 026/389: subed-srt-move-to-subtitle-id: Use let instead of setq, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c895b91 012/389: Add test for sanitizing on empty subtitle texts,
ELPA Syncer <=
- [nongnu] elpa/subed 6797d10 028/389: Use lexical scoping, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7939e0a 022/389: Move function to have same order as tests, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 31f8255 016/389: README: Turns out spaces are not the issue, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 27c8141 014/389: Some work on README, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6b97e24 023/389: Fix test's description, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7e04e16 013/389: Use C-u ... when inserting subtitles, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 005c0cc 027/389: Remove TODO for C-u N M-k, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed fd737b7 035/389: Use save-excursion in subed--save-excursion, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0815e10 047/389: Simplify subed-srt--regexp-duration, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed bbd239a 042/389: subed-srt--regenerate-ids: Wrap function body in atomic-change-group, ELPA Syncer, 2021/12/03