diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-02-17 00:50:10 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-02-17 00:50:10 +0100 |
commit | 2d21d2080c78b055c2a1d66bc232399aaa0c1232 (patch) | |
tree | 29e6ee70c41199ddfe3759555bd8ef8e267bdc6b | |
parent | 41c5fe0be8ad88e15e62408182675043a73d8465 (diff) | |
download | org-mode-2d21d2080c78b055c2a1d66bc232399aaa0c1232.tar.gz |
org-list: Add tests for `org-at-radio-list-p'
* testing/lisp/test-org-list.el (test-org-list/at-radio-list-p): New
test.
-rw-r--r-- | testing/lisp/test-org-list.el | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/lisp/test-org-list.el b/testing/lisp/test-org-list.el index c3864ca..b729ed8 100644 --- a/testing/lisp/test-org-list.el +++ b/testing/lisp/test-org-list.el @@ -917,6 +917,36 @@ b. Item 2<point>" (org-update-checkbox-count)) (buffer-string))))) + +;;; API + +(ert-deftest test-org-list/at-radio-list-p () + "Test `org-at-radio-list-p' specifications." + (should + (org-test-with-temp-text "#+attr_org: :radio t\n<point>- foo" + (org-at-radio-list-p))) + (should + (org-test-with-temp-text "#+attr_org: :radio t\n- foo\n<point>- bar" + (org-at-radio-list-p))) + (should + (org-test-with-temp-text "#+ATTR_ORG: :radio t\n<point>- foo" + (org-at-radio-list-p))) + (should + (org-test-with-temp-text "#+attr_org: :radio bar\n<point>- foo" + (org-at-radio-list-p))) + (should-not + (org-test-with-temp-text "#+attr_org: :radio nil\n<point>- foo" + (org-at-radio-list-p))) + (should-not + (org-test-with-temp-text "<point>- foo" + (org-at-radio-list-p))) + (should-not + (org-test-with-temp-text "#+attr_org: :radio t\n- foo\n <point>bar" + (org-at-radio-list-p))) + (should-not + (org-test-with-temp-text + "#+attr_org: :radio t\n#+begin_example\n<point>- foo\n#+end_example" + (org-at-radio-list-p)))) ;;; Miscellaneous |