[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-superstar bce708624d 039/162: updated composure-test t
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/org-superstar bce708624d 039/162: updated composure-test to run with new unit tests |
Date: |
Fri, 31 Dec 2021 19:35:22 -0500 (EST) |
branch: elpa/org-superstar
commit bce708624d760178d2bf535abd76425f8f2ae67a
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>
updated composure-test to run with new unit tests
---
tests/composure-test.el | 30 ++++++++++++------------------
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/tests/composure-test.el b/tests/composure-test.el
index a3b84da4ba..f9a7d59dda 100644
--- a/tests/composure-test.el
+++ b/tests/composure-test.el
@@ -13,7 +13,6 @@
(require 'cl-macs)
(require 'subr-x)
-(require 'linum)
(defvar-local org-superstar/listen nil
"If t, activate the advice ‘org-superstar/comp-test’.
@@ -27,16 +26,10 @@ active listeners by calling
‘org-superstar/toggle-listener’.")
'(org-superstar--prettify-ibullets
org-superstar--prettify-main-hbullet
org-superstar--prettify-other-hbullet
+ org-superstar--prettify-other-lbullet
org-superstar--prettify-leading-hbullets)
"List of functions ‘org-superstar/comp-test’ can be applied to.")
-;;; Hooks
-
-(add-hook 'org-mode-hook
- (lambda ()
- (linum-mode 1)
- (column-number-mode 1)))
-
;;; Advice definitions
(defun org-superstar/comp-test (start end &optional components mod-func)
@@ -48,7 +41,7 @@ of ‘compose-region’."
;; time. This test will only fail when I mess up regex grouping,
;; but it serves as a reminder that composing a region is not as
;; trivial as making the region bigger.
- (cl-assert (= 1 (- end start)))
+ (should (= 1 (- end start)))
(let ((line (line-number-at-pos start))
(col (save-excursion (goto-char start) (current-column)))
(composed-string (buffer-substring-no-properties start end)))
@@ -75,7 +68,7 @@ Ensure the return value is a face or nil. Also toggle
(let ((org-superstar/listen t)
(returned-face nil))
(prog1 (setq returned-face (apply face-function args))
- (cl-assert (or (facep returned-face)
+ (should (or (facep returned-face)
(null returned-face)))
(when (facep returned-face)
(message "Applied face ‘%s’ to group (line %d)"
@@ -109,16 +102,17 @@ Ensure the return value is a face or nil. Also toggle
:around #'org-superstar/wrap-prettify))))))
-(defun org-superstar/dismiss-composure ()
+(defun org-superstar/start-listening ()
+ "Set up all advices provided by composure-test."
+ (interactive)
+ (advice-add 'compose-region :before #'org-superstar/comp-test)
+ (dolist (symbol org-superstar/comp-listeners)
+ (org-superstar/toggle-listener symbol)))
+
+
+(defun org-superstar/dismiss-listening ()
"Remove all advices added by composure-test."
(interactive)
(advice-remove 'compose-region #'org-superstar/comp-test)
(dolist (symbol org-superstar/comp-listeners)
(advice-remove symbol #'org-superstar/wrap-prettify)))
-
-;; listen in on compose-region
-(advice-add 'compose-region :before #'org-superstar/comp-test)
-
-;; advise prettifyers
-(dolist (symbol org-superstar/comp-listeners)
- (org-superstar/toggle-listener symbol))
- [nongnu] elpa/org-superstar 93df81076b 005/162: added .gitignore, (continued)
- [nongnu] elpa/org-superstar 93df81076b 005/162: added .gitignore, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 5c65856b75 001/162: Initial commit, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar ae5dc54456 003/162: Fixed display errors of README on github, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 0dc7135507 008/162: removed unused version of prettify-leading-bullets., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar e668df215c 016/162: Major cleanup: fixing inconsistencies spotted by flycheck, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 7c693b1326 020/162: Added proper terminal support., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 8daeb3c4f3 040/162: added further reference files, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar f4ef9bb36d 017/162: added a roadmap., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar ffaf1feb01 018/162: added mention of worg contrib in order not to forget myself, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 9a60ffc4cc 058/162: Removing warning from source., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar bce708624d 039/162: updated composure-test to run with new unit tests,
Stefan Kangas <=
- [nongnu] elpa/org-superstar f5a258d524 057/162: Remove warnings from README., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar f7cb51960e 029/162: added FIXME: other-hbullet face behaves inconsistently when treated as leading bullet., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar a2876d7399 045/162: fixed bug in external module 'honest-marketing', Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar ca448ebd7c 065/162: Added a temporary file slomode.el, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 98bba637cd 078/162: removing old bullet point, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 22a44f14ee 026/162: overhauled testing module composure-test.el, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 589b136106 064/162: updating homepage., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar a0d2cfaae1 076/162: "org-mode" -> "Org mode", Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 4500a774bb 068/162: Added an FAQ., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar a078ca392a 079/162: Remove unnecessary lighter for Org Superstar., Stefan Kangas, 2021/12/31