branch: externals/hyperbole
commit 0e242bc1aea06f00b77d9b35ec2ab440e1350b2f
Merge: 0798e16ab0 12950cd2db
Author: bw <[email protected]>
Commit: bw <[email protected]>
Merge remote branch 'rsw' of hyperbole into rsw
---
test/hyrolo-tests.el | 82 +++++++++++++++++++++++------------------------
test/kotl-orgtbl-tests.el | 4 +--
2 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/test/hyrolo-tests.el b/test/hyrolo-tests.el
index d34dd6512a..786a60012f 100644
--- a/test/hyrolo-tests.el
+++ b/test/hyrolo-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <[email protected]>
;;
;; Orig-Date: 19-Jun-21 at 22:42:00
-;; Last-Mod: 26-Dec-23 at 01:57:38 by Bob Weiner
+;; Last-Mod: 28-Dec-23 at 12:48:26 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -294,10 +294,10 @@ and {b} the previous same level cell."
(unwind-protect
(progn
(hyrolo-fgrep "string")
- (with-current-buffer "*HyRolo*"
- (should (= (how-many "@loc>") 4))
- (dolist (f (list org-file kotl-file md-file outl-file))
- (should (= (how-many (concat "@loc> \"" f "\"")) 1)))))
+ (should (string= (buffer-name) "*HyRolo*"))
+ (should (= (how-many "@loc>") 4))
+ (dolist (f (list org-file kotl-file md-file outl-file))
+ (should (= (how-many (concat "@loc> \"" f "\"")) 1))))
(dolist (f (list org-file kotl-file md-file outl-file))
(hy-delete-file-and-buffer f))
(kill-buffer "*HyRolo*")
@@ -311,13 +311,14 @@ and {b} the previous same level cell."
(unwind-protect
(progn
(hyrolo-fgrep "string")
- (with-current-buffer "*HyRolo*"
- (should (= (how-many "@loc>") 1))
- (should (looking-at-p "==="))
- (hyrolo-next-visible-heading 1)
- (should (looking-at-p "* heading")))
- (kbd-key:key-series-to-events "y C-f")
- (action-key)
+ (should (string= (buffer-name) "*HyRolo*"))
+ (should (= (how-many "@loc>") 1))
+ (should (looking-at-p "==="))
+ (hyrolo-next-visible-heading 1)
+ (should (looking-at-p "* heading"))
+ (let ((revisit-normally (concat "y" (if noninteractive " RET"))))
+ (with-simulated-input revisit-normally
+ (action-key)))
(should (equal (current-buffer) (find-buffer-visiting org-file)))
(should (looking-at-p "* heading")))
(hy-delete-file-and-buffer org-file)
@@ -338,15 +339,14 @@ and {b} the previous same level cell."
(kotl-mode:newline 1)
(insert "more")
(hyrolo-fgrep "string")
- (with-current-buffer "*HyRolo*"
- (should (= (how-many "@loc>") 1))
- (should (looking-at-p "==="))
- (hyrolo-next-visible-heading 1)
- (should (looking-at-p ".*1\\. heading")))
- (with-simulated-input "y C-f" ; Do you want to revisit the file
normally now?
- (action-key)
- (should (equal (current-buffer) (find-buffer-visiting kotl-file)))
- (should (looking-at-p "heading"))))
+ (should (string= (buffer-name) "*HyRolo*"))
+ (should (= (how-many "@loc>") 1))
+ (should (looking-at-p "==="))
+ (hyrolo-next-visible-heading 1)
+ (should (looking-at-p ".*1\\. heading"))
+ (action-key)
+ (should (equal (current-buffer) (find-buffer-visiting kotl-file)))
+ (should (looking-at-p "heading")))
(hy-delete-file-and-buffer kotl-file)
(kill-buffer "*HyRolo*")
(delete-directory temporary-file-directory))))
@@ -359,11 +359,11 @@ and {b} the previous same level cell."
(unwind-protect
(progn
(hyrolo-fgrep "string")
- (with-current-buffer "*HyRolo*"
- (should (= (how-many "@loc>") 1))
- (should (looking-at-p "==="))
- (hyrolo-next-visible-heading 1)
- (should (looking-at-p "* heading")))
+ (should (string= (buffer-name) "*HyRolo*"))
+ (should (= (how-many "@loc>") 1))
+ (should (looking-at-p "==="))
+ (hyrolo-next-visible-heading 1)
+ (should (looking-at-p "* heading"))
(action-key)
(should (equal (current-buffer) (find-buffer-visiting outl-file)))
(should (looking-at-p "* heading")))
@@ -379,11 +379,11 @@ and {b} the previous same level cell."
(unwind-protect
(progn
(hyrolo-fgrep "string")
- (with-current-buffer "*HyRolo*"
- (should (= (how-many "@loc>") 1))
- (should (looking-at-p "==="))
- (hyrolo-next-visible-heading 1)
- (should (looking-at-p "# heading")))
+ (should (string= (buffer-name) "*HyRolo*"))
+ (should (= (how-many "@loc>") 1))
+ (should (looking-at-p "==="))
+ (hyrolo-next-visible-heading 1)
+ (should (looking-at-p "# heading"))
(action-key)
(should (equal (current-buffer) (find-buffer-visiting md-file)))
(should (looking-at-p "# heading")))
@@ -408,11 +408,11 @@ Match a string in a level 2 child cell."
(kotl-mode:newline 1)
(insert "more")
(hyrolo-fgrep "string")
- (with-current-buffer "*HyRolo*"
- (should (= (how-many "@loc>") 1))
- (should (looking-at-p "==="))
- (hyrolo-next-visible-heading 1)
- (should (looking-at-p ".*1a\\. heading")))
+ (should (string= (buffer-name) "*HyRolo*"))
+ (should (= (how-many "@loc>") 1))
+ (should (looking-at-p "==="))
+ (hyrolo-next-visible-heading 1)
+ (should (looking-at-p ".*1a\\. heading"))
(action-key)
(should (equal (current-buffer) (find-buffer-visiting kotl-file)))
(should (looking-at-p "heading")))
@@ -437,11 +437,11 @@ Match a string in the second cell."
(kotl-mode:newline 1)
(insert "more")
(hyrolo-fgrep "string")
- (with-current-buffer "*HyRolo*"
- (should (= (how-many "@loc>") 1))
- (should (looking-at-p "==="))
- (hyrolo-next-visible-heading 1)
- (should (looking-at-p ".*2\\. heading")))
+ (should (string= (buffer-name) "*HyRolo*"))
+ (should (= (how-many "@loc>") 1))
+ (should (looking-at-p "==="))
+ (hyrolo-next-visible-heading 1)
+ (should (looking-at-p ".*2\\. heading"))
(action-key)
(should (equal (current-buffer) (find-buffer-visiting kotl-file)))
(should (looking-at-p "heading")))
diff --git a/test/kotl-orgtbl-tests.el b/test/kotl-orgtbl-tests.el
index 434391bfdc..6daefb3a6b 100644
--- a/test/kotl-orgtbl-tests.el
+++ b/test/kotl-orgtbl-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <[email protected]>
;;
;; Orig-Date: 2-Nov-21 at 17:04:30
-;; Last-Mod: 1-Mar-22 at 23:24:01 by Mats Lidell
+;; Last-Mod: 27-Dec-23 at 16:54:00 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -61,7 +61,7 @@
(should (hact 'kbd-key "RET |field1|field2| RET"))
(hy-test-helpers:consume-input-events)
- (left-char 1)
+ (kotl-mode:backward-char 1)
(action-key)
(should-not orgtbl-mode)
(action-key)