[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 2cfd433622 030/199: extended quotes tests
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 2cfd433622 030/199: extended quotes tests |
Date: |
Sun, 3 Sep 2023 06:59:24 -0400 (EDT) |
branch: elpa/adoc-mode
commit 2cfd43362277628ee511df2c860e4e456956f833
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
extended quotes tests
---
adoc-mode-test.el | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 54 insertions(+), 2 deletions(-)
diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index 71d4a54893..337c618350 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -37,7 +37,8 @@
(ert-should (equal tmp tmp2)))))
(if (< (point) (point-max))
(forward-char 1)
- (setq not-done nil))))))
+ (setq not-done nil)))))
+ (kill-buffer (concat "adoctest-" name)))
(ert-deftest adoctest-test-titles-simple ()
(adoctest-faces "titles-simple"
@@ -147,7 +148,53 @@
"Lorem " 'no-face "*" markup-meta-hide-face "ipsum" markup-strong-face "\n"
nil
"dolor" markup-strong-face "*" markup-meta-hide-face " sit" 'no-face "\n"
nil
"Lorem " 'no-face "__" markup-meta-hide-face "ipsum" markup-emphasis-face
"\n" nil
- "dolor" markup-emphasis-face "__" markup-meta-hide-face " sit" 'no-face
"\n" nil))
+ "dolor" markup-emphasis-face "__" markup-meta-hide-face " sit" 'no-face
"\n" nil
+ "\n" nil
+
+ ;; tests border case that delimiter is at the beginnin/end of an
paragraph/line
+ ;; constrained at beginning
+ "*" markup-meta-hide-face "lorem" 'markup-strong-face "*"
markup-meta-hide-face " ipsum\n" 'no-face
+ "\n" nil
+ ;; constrained at end
+ "lorem " 'no-face "*" markup-meta-hide-face "ipsum" markup-strong-face "*"
markup-meta-hide-face "\n" nil
+ "\n" nil
+ ;; constrained from beginning to end
+ "*" markup-meta-hide-face "lorem" markup-strong-face "*"
markup-meta-hide-face "\n" nil
+ "\n" nil
+ ;; unconstrained at beginning. Note that "** " at the beginning of a line
would be a list item.
+ "__" markup-meta-hide-face " lorem " 'markup-emphasis-face "__"
markup-meta-hide-face " ipsum\n" 'no-face
+ "\n" nil
+ ;; unconstrained at end
+ "lorem " 'no-face "__" markup-meta-hide-face " ipsum " markup-emphasis-face
"__" markup-meta-hide-face "\n" nil
+ "\n" nil
+ ;; unconstrained from beginning to end
+ "__" markup-meta-hide-face " lorem " markup-emphasis-face "__"
markup-meta-hide-face "\n" nil
+ "\n" nil
+
+ ;; test wheter quotes can nest
+ ;; done by meta-face-cleanup
+
+ ;; tests that quotes work within titles / labeled lists
+ "== " markup-meta-hide-face "chapter " markup-title-1-face "*"
markup-meta-hide-face "1" '(markup-title-1-face markup-strong-face) "*"
markup-meta-hide-face " ==" markup-meta-hide-face "\n" nil
+ "\n" nil
+ "chapter " markup-title-2-face "_" markup-meta-hide-face "2"
'(markup-title-2-face markup-emphasis-face) "_" markup-meta-hide-face "\n" nil
+ "~~~~~~~~~~~" markup-meta-hide-face "\n" nil
+ "." markup-meta-face "lorem " 'markup-gen-face "_" markup-meta-hide-face
"ipsum" '(markup-gen-face markup-emphasis-face) "_" markup-meta-hide-face "\n"
nil
+ "\n" nil
+ "lorem " markup-gen-face "+" markup-meta-hide-face "ipsum"
'(markup-gen-face markup-typewriter-face) "+" markup-meta-hide-face " sit"
markup-gen-face "::" markup-list-face " " adoc-align "\n" nil
+ ))
+
+;; test border cases where the quote delimiter is at the beginning and/or the
+;; end of the buffer
+(ert-deftest adoctest-test-quotes-medium-2 ()
+ (adoctest-faces "test-quotes-medium-2"
+ "*" markup-meta-hide-face "lorem" markup-strong-face "*"
markup-meta-hide-face " ipsum" 'no-face))
+(ert-deftest adoctest-test-quotes-medium-3 ()
+ (adoctest-faces "test-quotes-medium-3"
+ "lorem " 'no-face "*" markup-meta-hide-face "ipsum" markup-strong-face "*"
markup-meta-hide-face))
+(ert-deftest adoctest-test-quotes-medium-4 ()
+ (adoctest-faces "test-quotes-medium-4"
+ "*" markup-meta-hide-face "lorem" markup-strong-face "*"
markup-meta-hide-face))
(ert-deftest adoctest-test-lists-simple ()
(adoctest-faces "test-lists-simple"
@@ -194,6 +241,11 @@
(ert-deftest adoctest-test-meta-face-cleanup ()
;; begin with a few simple explicit cases which are easier to debug in case
of troubles
+
+ ;; 1) test that meta characters always only have a single meta and don't get
+ ;; markup-bold/-emphasis/... face just because they are within a
+ ;; strongh/emphasis/... construct.
+ ;; 2) test that nested quotes really apply the faces of both quotes to the
inner text
(adoctest-faces "meta-face-cleanup-1"
"*" markup-meta-hide-face "lorem " markup-strong-face
"_" markup-meta-hide-face "ipsum" '(markup-strong-face
markup-emphasis-face) "_" markup-meta-hide-face
- [nongnu] elpa/adoc-mode 2c4847d843 160/199: Tweak a couple of docstrings, (continued)
- [nongnu] elpa/adoc-mode 2c4847d843 160/199: Tweak a couple of docstrings, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode c3d738dd7d 169/199: Fix a typo, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 109bdc5d13 180/199: Fix a typo and some whitespace issues, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 9e7af55e7e 183/199: Fix a typo, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b0702bdeb8 187/199: [Fix #33] Address noticeable lag when typing in larger code blocks (#35), ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 526e058665 029/199: added another list item test, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a0ddf0f02d 034/199: added tests for images, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1a4e93ec7c 035/199: enhanded general block macro incl. tests, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode fcabdc3a7e 037/199: added general inline macro, began reworking anchors, touched image, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 656e7670c5 099/199: fixed type: denote -> demote, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2cfd433622 030/199: extended quotes tests,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode a61e7cd749 063/199: added AsciiDoc menu & key map, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 22bd99a194 075/199: test: Use with-temp-buffer instead home-brewed solution, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a3d77b0c15 082/199: bumped copyright year, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a8142043e5 094/199: adoc customization group comment puts more emphasis on that most faces belong to markup-faces, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1206fe7409 103/199: adoc-re-inline-macro can now also match in the middle of a word, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 0ac95247d4 116/199: refactoring so regexp's for one- and two line titles have group 2 for title's text, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 411eb48ce9 120/199: Sensorflo/pr35 (#3), ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 69569ee920 105/199: improved fontifying for footnoteref, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6dc82593f0 162/199: Document the mode's history, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 4415af4a53 036/199: fixed typo in identifier, ELPA Syncer, 2023/09/03