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

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

[elpa] externals/hyperbole f3248f57a5 2/4: Merge branch 'master' into rs


From: ELPA Syncer
Subject: [elpa] externals/hyperbole f3248f57a5 2/4: Merge branch 'master' into rsw
Date: Wed, 14 Aug 2024 03:58:13 -0400 (EDT)

branch: externals/hyperbole
commit f3248f57a56e939ef485fa1013feb251209137d0
Merge: 927ad37220 bc22f165bc
Author: bw <rsw@gnu.org>
Commit: bw <rsw@gnu.org>

    Merge branch 'master' into rsw
---
 Makefile             |  4 ++--
 test/hywiki-tests.el | 50 +++++++++++++++++++++++++++++++-------------------
 2 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/Makefile b/Makefile
index 1bd33371a2..085b6203d8 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 # Author:       Bob Weiner
 #
 # Orig-Date:    15-Jun-94 at 03:42:38
-# Last-Mod:      9-Jul-24 at 09:06:21 by Mats Lidell
+# Last-Mod:     12-Aug-24 at 00:26:29 by Mats Lidell
 #
 # Copyright (C) 1994-2023  Free Software Foundation, Inc.
 # See the file HY-COPY for license information.
@@ -363,7 +363,7 @@ TAGS: $(EL_TAGS)
        $(ETAGS) --regex='{lisp}/(ert-deftest[ \t]+\([^ \t\n\r\f()]+\)/' 
$(EL_TAGS)
 
 clean:
-       $(RM) hyperbole-autoloads.el kotl/kotl-autoloads.el $(ELC_COMPILE) 
$(ELC_KOTL) TAGS
+       $(RM) hyperbole-autoloads.el kotl/kotl-autoloads.el $(ELC_COMPILE) 
$(ELC_KOTL) TAGS test/*.elc
 
 version:
        @echo ""
diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el
index c54601f80e..6e1b802b20 100644
--- a/test/hywiki-tests.el
+++ b/test/hywiki-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell
 ;;
 ;; Orig-Date:    18-May-24 at 23:59:48
-;; Last-Mod:      6-Aug-24 at 22:36:47 by Mats Lidell
+;; Last-Mod:     14-Aug-24 at 01:41:38 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -211,10 +211,8 @@
       (hy-delete-file-and-buffer wiki-page)
       (hy-delete-dir-and-buffer hywiki-directory))))
 
-;; Following two test cases for verifying proper face is some what
-;; experimental. They need to be run in interactive mode and with the
-;; help of hy-test-helpers:consume-input-events it seems the property
-;; can be verified.
+;; Following three test cases for verifying proper face is some what
+;; experimental. They need to be run in interactive mode.
 
 (ert-deftest hywiki-tests--face-property-for-wikiword-with-wikipage ()
   "Verify WikiWord for a wiki page gets face property hywiki-word-face."
@@ -224,13 +222,11 @@
          (wikipage (hywiki-add-page "WikiWord")))
     (unwind-protect
         (with-temp-buffer
-          (let ((buffer (current-buffer)))
-            (hywiki-mode 1)
-            (insert "WikiWord")
-           (newline nil t)
-            (hy-test-helpers:consume-input-events)
-            (goto-char 4)
-            (should (hproperty:but-get (point) 'face hywiki-word-face))))
+          (hywiki-mode 1)
+          (insert "WikiWord")
+         (newline nil t)
+          (goto-char 4)
+          (should (hproperty:but-get (point) 'face hywiki-word-face)))
       (hywiki-mode 0)
       (hy-delete-file-and-buffer wikipage)
       (hy-delete-dir-and-buffer hywiki-directory))))
@@ -242,13 +238,29 @@
          (hywiki-directory (make-temp-file "hywiki" t)))
     (unwind-protect
         (with-temp-buffer
-          (let ((buffer (current-buffer)))
-            (hywiki-mode 0)
-            (insert "WikiWord")
-           (newline nil t)
-            (hy-test-helpers:consume-input-events)
-            (goto-char 4)
-            (should-not (hproperty:but-get (point) 'face hywiki-word-face))))
+          (hywiki-mode 0)
+          (insert "WikiWord")
+         (newline nil t)
+          (goto-char 4)
+          (should-not (hproperty:but-get (point) 'face hywiki-word-face)))
+      (hy-delete-dir-and-buffer hywiki-directory))))
+
+(ert-deftest hywiki-tests--convert-words-to-org-link ()
+  "Verify `hywiki-convert-words-to-org-links' converts WikiWords to org links."
+  (skip-unless (not noninteractive))
+  (let* ((hywiki-directory (make-temp-file "hywiki" t))
+         (wikipage (hywiki-add-page "WikiWord")))
+    (unwind-protect
+        (with-temp-buffer
+          (hywiki-mode 1)
+          (insert "WikiWord")
+         (newline nil t)
+          (goto-char 4)
+          (hywiki-convert-words-to-org-links)
+          (should (string= "[[hy:WikiWord]]\n"
+                           (buffer-substring-no-properties (point-min) 
(point-max)))))
+      (hywiki-mode 0)
+      (hy-delete-file-and-buffer wikipage)
       (hy-delete-dir-and-buffer hywiki-directory))))
 
 (ert-deftest hywiki-tests--at-tags-p ()



reply via email to

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