[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode ead05da007 014/199: split up the current big tes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode ead05da007 014/199: split up the current big test into smaller ones |
Date: |
Sun, 3 Sep 2023 06:59:12 -0400 (EDT) |
branch: elpa/adoc-mode
commit ead05da007442be97ea4bf4fbfe31f723c048db5
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
split up the current big test into smaller ones
---
adoc-mode-test.el | 64 +++++++++++++++++++++++++++----------------------------
1 file changed, 31 insertions(+), 33 deletions(-)
diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index f576cf44df..41b85047ff 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -3,8 +3,15 @@
;; todo
;; test for font lock multiline property
+;; todo
+;; !!!!!!!!!!!!!
+;; Lock Support Mode must be set to nil
+;; !!!!!!!!!!!!!
+
+;; todo: test for presence of adoc-reserved (we do white-box testing here)
+
-(defun adoctest-make-buffer (&rest args)
+(defun adoctest-faces (&rest args)
(set-buffer (get-buffer-create "adoctest"))
(delete-region (point-min) (point-max))
@@ -13,19 +20,22 @@
(setq args (cddr args)))
(adoc-mode)
- (font-lock-fontify-buffer))
-
-(ert-deftest adoctest-foo ()
- ;; todo
- ;; !!!!!!!!!!!!!
- ;; Lock Support Mode must be set to nil
- ;; !!!!!!!!!!!!!
-
- ;; todo: test for presence of adoc-reserved (we do white-box testing here)
-
+ (font-lock-fontify-buffer)
+ (goto-char (point-min))
+ (let ((not-done t))
+ (while not-done
+ (let* ((tmp (get-text-property (point) 'adoctest))
+ (tmp2 (get-text-property (point) 'face)))
+ (when tmp
+ (if (and (listp tmp2) (not (listp tmp)))
+ (ert-should (and (= 1 (length tmp2)) (equal tmp (car tmp2))))
+ (ert-should (equal tmp tmp2))))
+ (if (< (point) (point-max))
+ (forward-char 1)
+ (setq not-done nil))))))
- ;; the white after = really is part of the delimiter
- (adoctest-make-buffer
+(ert-deftest adoctest-test-titles-simple ()
+ (adoctest-faces
"= " markup-meta-hide-face "document title" markup-title-0-face "\n" nil
"\n" nil
"== " markup-meta-hide-face "chapter 1" markup-title-1-face "\n" nil
@@ -63,9 +73,10 @@
"^^^^^^^^^" markup-meta-hide-face "\n" nil
"\n" nil
"chapter 4" markup-title-4-face "\n" nil
- "+++++++++" markup-meta-hide-face "\n" nil
- "\n" nil
+ "+++++++++" markup-meta-hide-face "\n" nil))
+(ert-deftest adoctest-test-delimited-blocks-simple ()
+ (adoctest-faces
"////////" markup-meta-hide-face "\n" nil
"comment line 1\ncomment line 2" markup-comment-face "\n" nil
"////////" markup-meta-hide-face "\n" nil
@@ -96,9 +107,10 @@
"\n" nil
"--" markup-meta-hide-face "\n" nil
"open block line 1\nopen block line 2" nil "\n" nil
- "--" markup-meta-hide-face "\n" nil
- "\n" nil
+ "--" markup-meta-hide-face "\n" nil))
+(ert-deftest adoctest-test-quotes-simple ()
+ (adoctest-faces
;; note that in unconstraned quotes cases " ipsum " has spaces around, in
;; constrained quotes case it doesn't
"Lorem " nil "`" markup-meta-hide-face "ipsum" '(markup-typewriter-face
markup-verbatim-face) "`" markup-meta-hide-face " dolor\n" nil
@@ -116,21 +128,7 @@
"Lorem " nil "##" markup-meta-hide-face " ipsum " markup-gen-face "##"
markup-meta-hide-face " dolor\n" nil
"Lorem " nil "#" markup-meta-hide-face "ipsum" markup-gen-face "#"
markup-meta-hide-face " dolor\n" nil
"Lorem " nil "~" markup-meta-hide-face " ipsum " markup-subscript-face "~"
markup-meta-hide-face " dolor\n" nil
- "Lorem " nil "^" markup-meta-hide-face " ipsum " markup-superscript-face
"^" markup-meta-hide-face " dolor\n" nil
- )
-
- (goto-char (point-min))
- (let ((not-done t))
- (while not-done
- (let* ((tmp (get-text-property (point) 'adoctest))
- (tmp2 (get-text-property (point) 'face)))
- (when tmp
- (if (and (listp tmp2) (not (listp tmp)))
- (ert-should (and (= 1 (length tmp2)) (equal tmp (car tmp2))))
- (ert-should (equal tmp tmp2))))
- (if (< (point) (point-max))
- (forward-char 1)
- (setq not-done nil))))))
+ "Lorem " nil "^" markup-meta-hide-face " ipsum " markup-superscript-face
"^" markup-meta-hide-face " dolor\n" nil))
-(ert-run-tests-interactively "^adoctest-")
+(ert-run-tests-interactively "^adoctest-test-")
- [nongnu] elpa/adoc-mode 9753b42821 065/199: bumped version to V0.5.0, (continued)
- [nongnu] elpa/adoc-mode 9753b42821 065/199: bumped version to V0.5.0, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 3501940311 073/199: test: running the test is a bit more smoothly, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 734527e2d4 077/199: added link to markup-faces within customization group, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 569eff13b1 078/199: added lots of templates & easy-menu-entries, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 16fe6044b7 081/199: bumped version to 0.6.0, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 091f46e866 061/199: test: added test for goto-ref-label, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2322c32185 076/199: extracted make-two-line-title-underline from make-two-line-title, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode efa9ef97a0 080/199: list item tempos respect tab-width and indent-tabs-mode, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 9c395f4bf9 093/199: it's now less likely that text between two adjacent delimited blocks is misinterpreted as delimited block, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 06f9792fcd 011/199: added further simple tests for constrained/uncronstrained quotes, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode ead05da007 014/199: split up the current big test into smaller ones,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode f519baf304 022/199: addef *.elc files to .gitignore, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 886497d6a6 023/199: added a few medium complex tests for (un)constrained quotes, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b65c7fcb92 026/199: block title now fits into the new concept, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 0f7619cfce 027/199: enheanced inline-subst-boundaries test, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b8e8574afa 038/199: introduced adoc-attribute-face-alist, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode e03d63e0b3 039/199: extened anchors unittest and fixed revealed bug, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6ccb9d6de5 009/199: intermediate checkin - to be removed, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode ce247928ec 021/199: added test for byte-compile-file without errors, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 105519ce37 033/199: changed image fontification without tests, added tests for attribute lists, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 3d2ab81750 041/199: new style font lock for xref inline macro, ELPA Syncer, 2023/09/03