emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/adoc-mode 091f46e866 061/199: test: added test for goto-re


From: ELPA Syncer
Subject: [nongnu] elpa/adoc-mode 091f46e866 061/199: test: added test for goto-ref-label
Date: Sun, 3 Sep 2023 06:59:34 -0400 (EDT)

branch: elpa/adoc-mode
commit 091f46e866f05d64b20c3493fc5879a8d425c4f6
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>

    test: added test for goto-ref-label
---
 adoc-mode-test.el | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index 8990056ef1..c31212263b 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -554,6 +554,23 @@
        (should (equal (adoc-xref-id-at-point) "foo")))
     (kill-buffer "adoc-test")))
 
+(ert-deftest adoctest-test-goto-ref-label ()
+  (unwind-protect
+      (progn
+       (set-buffer (get-buffer-create "adoc-test")) 
+       (insert "[[foo]]\n"                ;1
+               "lorem ipsum\n"            ;2
+               "[[bar]]\n"                ;3
+               "dolor [[geil]]sit amen\n" ;4
+               "anchor:cool[]\n")         ;5
+       (adoc-goto-ref-label "cool")
+       (should (equal (line-number-at-pos) 5))
+       (adoc-goto-ref-label "geil")
+       (should (equal (line-number-at-pos) 4))
+       (adoc-goto-ref-label "bar")
+       (should (equal (line-number-at-pos) 3)))
+    (kill-buffer "adoc-test")))
+
 (ert-deftest adoctest-pre-test-byte-compile ()
   ;; todo: also test for warnings
   (when (file-exists-p "adoc-mode.elc")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]