Skip to content

Commit

Permalink
test-ol: Rename cases to match the default selector
Browse files Browse the repository at this point in the history
* testing/lisp/test-ol.el (test-ol/encode): Rename to
`test-org-link/encode'.
(test-ol/decode): Rename to `test-org-link/decode'.
(test-ol/encode-url-with-escaped-char): Rename to
`test-org-link/encode-url-with-escaped-char'.
(test-ol/org-toggle-link-display): Rename to
`test-org-link/toggle-link-display'.
(test-ol/escape): Rename to `test-org-link/escape'.
(test-ol/unescape): Rename to `test-org-link/unescape'.
(test-ol/make-string): Rename to `test-org-link/make-string'.
(test-ol/store-link): Rename to `test-org-link/store-link'.
(test-ol/update-radio-target-regexp): Rename to
`test-org-link/update-radio-target-regexp'.
(test-ol/next-link): Rename to `test-org-link/next-link'.
(test-ol/previous-link): Rename to `test-org-link/previous-link'.
(test-ol/plain-link-re): Rename to `test-org-link/plain-link-re'.

Only `test-ol/org-toggle-link-display' was executed during
"make test" since it is the only name matched by the "org|ob" default
selector.  Reported in: Ihor Radchenko to emacs-orgmode.
Re [PATCH v7] ol.el: add description format parameter
to org-link-parameters.  Sun, 24 Jul 2022 21:15:31 +0800.
https://list.orgmode.org/87v8rmd53g.fsf@localhost/
  • Loading branch information
maxnikulin authored and yantar92 committed Jul 29, 2022
1 parent d37c0ee commit 2027445
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions testing/lisp/test-ol.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

;;; Decode and Encode Links

(ert-deftest test-ol/encode ()
(ert-deftest test-org-link/encode ()
"Test `org-link-encode' specifications."
;; Regural test.
(should (string= "Foo%3A%42ar" (org-link-encode "Foo:Bar" '(?\: ?\B))))
Expand All @@ -33,7 +33,7 @@
;; Encode a Unicode multibyte character.
(should (string= "%E2%82%AC" (org-link-encode "" '(?\€)))))

(ert-deftest test-ol/decode ()
(ert-deftest test-org-link/decode ()
"Test `org-link-decode' specifications."
;; Decode an ASCII character.
(should (string= "[" (org-link-decode "%5B")))
Expand All @@ -42,15 +42,15 @@
;; Decode a Unicode multibyte character.
(should (string= "" (org-link-decode "%E2%82%AC"))))

(ert-deftest test-ol/encode-url-with-escaped-char ()
(ert-deftest test-org-link/encode-url-with-escaped-char ()
"Encode and decode a URL that includes an encoded char."
(should
(string= "http://some.host.com/form?&id=blah%2Bblah25"
(org-link-decode
(org-link-encode "http://some.host.com/form?&id=blah%2Bblah25"
'(?\s ?\[ ?\] ?%))))))

(ert-deftest test-ol/org-toggle-link-display ()
(ert-deftest test-org-link/toggle-link-display ()
"Make sure that `org-toggle-link-display' is working.
See https://github.com/yantar92/org/issues/4."
(dolist (org-link-descriptive '(nil t))
Expand All @@ -77,7 +77,7 @@ See https://github.com/yantar92/org/issues/4."

;;; Escape and Unescape Links

(ert-deftest test-ol/escape ()
(ert-deftest test-org-link/escape ()
"Test `org-link-escape' specifications."
;; No-op when there is no backslash or square bracket.
(should (string= "foo" (org-link-escape "foo")))
Expand All @@ -101,7 +101,7 @@ See https://github.com/yantar92/org/issues/4."
(should (string= "\\[\\[\\[foo\\]\\]\\]" (org-link-escape "[[[foo]]]")))
(should (string= "\\[\\[foo\\]\\] bar" (org-link-escape "[[foo]] bar"))))

(ert-deftest test-ol/unescape ()
(ert-deftest test-org-link/unescape ()
"Test `org-link-unescape' specifications."
;; No-op if there is no backslash.
(should (string= "foo" (org-link-unescape "foo")))
Expand All @@ -122,7 +122,7 @@ See https://github.com/yantar92/org/issues/4."
(should (string= "[[[foo]]]" (org-link-unescape "\\[\\[\\[foo\\]\\]\\]")))
(should (string= "[[foo]] bar" (org-link-unescape "\\[\\[foo\\]\\] bar"))))

(ert-deftest test-ol/make-string ()
(ert-deftest test-org-link/make-string ()
"Test `org-link-make-string' specifications."
;; Throw an error on empty URI.
(should-error (org-link-make-string ""))
Expand All @@ -147,7 +147,7 @@ See https://github.com/yantar92/org/issues/4."

;;; Store links

(ert-deftest test-ol/store-link ()
(ert-deftest test-org-link/store-link ()
"Test `org-store-link' specifications."
;; On a headline, link to that headline. Use heading as the
;; description of the link.
Expand Down Expand Up @@ -380,7 +380,7 @@ See https://github.com/yantar92/org/issues/4."

;;; Radio Targets

(ert-deftest test-ol/update-radio-target-regexp ()
(ert-deftest test-org-link/update-radio-target-regexp ()
"Test `org-update-radio-target-regexp' specifications."
;; Properly update cache with no previous radio target regexp.
(should
Expand Down Expand Up @@ -414,7 +414,7 @@ See https://github.com/yantar92/org/issues/4."

;;; Navigation

(ert-deftest test-ol/next-link ()
(ert-deftest test-org-link/next-link ()
"Test `org-next-link' specifications."
;; Move to any type of link.
(should
Expand Down Expand Up @@ -465,7 +465,7 @@ See https://github.com/yantar92/org/issues/4."
(org-next-link)
(buffer-substring (point) (search-forward "]]" nil t))))))

(ert-deftest test-ol/previous-link ()
(ert-deftest test-org-link/previous-link ()
"Test `org-previous-link' specifications."
;; Move to any type of link.
(should
Expand Down Expand Up @@ -527,7 +527,7 @@ See https://github.com/yantar92/org/issues/4."
(list (org-element-property :type (org-element-link-parser))
(org-element-property :path (org-element-link-parser)))))

(ert-deftest test-ol/plain-link-re ()
(ert-deftest test-org-link/plain-link-re ()
"Test `org-link-plain-re'."
(should
(equal
Expand Down

0 comments on commit 2027445

Please sign in to comment.