branch: externals/hyperbole
commit 91202282f759cdecb527cd804449c5f8f02b88d2
Author: bw <[email protected]>
Commit: bw <[email protected]>

    hywiki-tests--publish-special-cases - Fix matching issues
---
 ChangeLog            |  2 ++
 test/hywiki-tests.el | 15 ++++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6164bea1c6..d12a9a8ede 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
 * test/hywiki-tests.el (hywiki-tests--word-at): Return HyWikiWord reference
     at point only if it has a referent.
+                       (hywiki-tests--publish-special-cases): Fix matching
+    issues.
 
 * hywiki.el (hywiki-word-store-around-point): Dehighlight only if Emacs
     is idle and within a hywikiword in a valid context.
diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el
index 45a27ea891..594b0b2ffb 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:      1-Feb-26 at 19:39:45 by Bob Weiner
+;; Last-Mod:      1-Feb-26 at 22:54:37 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -1113,10 +1113,10 @@ WikiWord#Csection-subsection
            (should (file-exists-p wikiword))
 
             (dolist (v `(("WikiWord WikiWord" . ,(format "%s %s" href href))
-                        ("\"WikiWord WikiWord\"" . ,(format "\"%s%s\"" href 
href))
+                        ("\"WikiWord WikiWord\"" . ,(format "\"%s %s\"" href 
href))
                         ;;                                       ^ Missing a 
space!?
                         ("WikiWord Text WikiWord" . ,(format "%s Text %s" href 
href))
-                        ("\"WikiWord Text WikiWord\"" . ,(format "\"%s%s\"" 
href href))
+                        ("\"WikiWord Text WikiWord\"" . ,(format "\"%s Text 
%s\"" href href))
                         ;;                                            ^ 
Missing " Text "
                         ("WikiWord WikiWord WikiWord" . ,(format "%s %s %s" 
href href href))
                         ;; !! TODO FIXME
@@ -1135,10 +1135,15 @@ WikiWord#Csection-subsection
                (hywiki-publish-to-html t)
 
                ;; Verify Export
-               (ert-info ((format "Publish '%s' => Expect '%s'" input 
regex-output))
+               (ert-info ((format (concat "Publish '%s' => Expect '%s'\n"
+                                          "Actual '%s'")
+                                  input
+                                  regex-output
+                                  (org-file-contents wikipage-html)))
                  (find-file wikipage-html t)
                   (revert-buffer t t)
-                  (should (= 1 (count-matches regex-output (point-min) 
(point-max))))))))
+                  (should (= 1 (count-matches (regexp-quote regex-output)
+                                             (point-min) (point-max))))))))
        ;; Unwind
        (hy-delete-files-and-buffers (list wikipage wikiword wikipage-html 
wikiword-html
                                           (expand-file-name "index.org" 
hywiki-directory)

Reply via email to