[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole d4c881007b 035/143: Add remaining test cases
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole d4c881007b 035/143: Add remaining test cases for fast-demo |
Date: |
Mon, 19 Feb 2024 15:58:51 -0500 (EST) |
branch: externals/hyperbole
commit d4c881007b8d7cd5bca07a7f500f0986fa8bc58a
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: Mats Lidell <mats.lidell@lidells.se>
Add remaining test cases for fast-demo
---
ChangeLog | 14 +++--
test/demo-tests.el | 151 +++++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 153 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ef08cf8ce4..f020cc7fde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,16 @@
2023-12-29 Mats Lidell <matsl@gnu.org>
-* test/demo-tests.el
- (fast-demo-outline-section-anchor-and-relative-line-number-test): Add
- test for outline section with line and column.
+* test/demo-tests.el (fast-demo-markdown-anchor-with-spaces)
+ (fast-demo-elisp-or-env-vars, fast-demo-elisp-library-in-load-path)
+ (fast-demo-info-manual-references, fast-demo-grep)
+ (fast-demo-python-trace-back, fast-demo-man-k)
+ (fast-demo-action-button-shell, fast-demo-action-button-fill-column)
+ (fast-demo-display-demo-using-action-buttons)
+ (fast-demo-display-kotl-starting-from-cell)
+ (fast-demo-outline-section-anchor-and-relative-line-number)
+ (fast-demo-markdown-anchor-with-spaces)
+ (fast-demo-elisp-library-in-load-path)
+ (fast-demo-elisp-or-env-vars): Add remaining test cases for fast-demo.
2023-12-28 Bob Weiner <rsw@gnu.org>
diff --git a/test/demo-tests.el b/test/demo-tests.el
index c0c0260de6..0b1c328de8 100644
--- a/test/demo-tests.el
+++ b/test/demo-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 30-Jan-21 at 12:00:00
-;; Last-Mod: 28-Dec-23 at 18:58:46 by Mats Lidell
+;; Last-Mod: 29-Dec-23 at 00:19:28 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -240,13 +240,6 @@
(action-key)
(hy-test-helpers:should-last-message "Result = nil; Boolean value =
False")))
-(ert-deftest demo-implicit-button-action-button-variable-display-test ()
- (with-temp-buffer
- (insert "<fill-column>")
- (goto-char 2)
- (action-key)
- (hy-test-helpers:should-last-message (format "fill-column = %d"
(current-fill-column)))))
-
(ert-deftest demo-implicit-button-hash-link-test ()
(unwind-protect
(with-temp-buffer
@@ -427,7 +420,7 @@
;;; Fast demo
;; Implicit Buttons
-(ert-deftest fast-demo-outline-section-anchor-and-relative-line-number-test ()
+(ert-deftest fast-demo-outline-section-anchor-and-relative-line-number ()
"Verify star outline section links with line and column works."
(dolist (link '("\"HY-NEWS#ORG MODE:3:6\"" "\"HY-NEWS#ORG MODE:L3:C6\""))
(unwind-protect
@@ -440,6 +433,50 @@
(should (looking-at-p "M-RET: Reworked"))))
(hy-test-helpers:kill-buffer "HY-NEWS"))))
+(ert-deftest fast-demo-markdown-anchor-with-spaces ()
+ "Verify anchor with spaces works."
+ (unwind-protect
+ (let ((default-directory hyperb:dir))
+ (with-temp-buffer
+ (insert "\"README.md#Hyperbole Components\"")
+ (goto-char 3)
+ (action-key)
+ (should (string= (buffer-name (current-buffer)) "README.md"))
+ (should (looking-at-p "## Hyperbole Components"))))
+ (hy-test-helpers:kill-buffer "README.md")))
+
+(ert-deftest fast-demo-elisp-or-env-vars ()
+ "Verify Elisp or env variables work in paths."
+ (unwind-protect
+ (with-temp-buffer
+ (insert "\"${hyperb:dir}/HY-NEWS\"")
+ (goto-char 3)
+ (action-key)
+ (should (string= (buffer-name (current-buffer)) "HY-NEWS")))
+ (hy-test-helpers:kill-buffer "HY-NEWS")))
+
+(ert-deftest fast-demo-elisp-library-in-load-path ()
+ "Verify ibut to Elisp library works."
+ (let (bufname)
+ (unwind-protect
+ (with-temp-buffer
+ (insert "\"subr.el\"")
+ (goto-char 3)
+ (action-key)
+ (setq bufname (buffer-name (current-buffer)))
+ (should (string-prefix-p "subr.el" bufname))))
+ (hy-test-helpers:kill-buffer bufname)))
+
+(ert-deftest fast-demo-info-manual-references ()
+ "Verify info manual references works."
+ (unwind-protect
+ (with-temp-buffer
+ (insert "\"(hyperbole)action-key-modeline-function\"")
+ (goto-char 3)
+ (action-key)
+ (should (string= Info-current-node "Smart Mouse Key Modeline Clicks")))
+ (hy-test-helpers:kill-buffer "*info*")))
+
;; Fast demo key series
(ert-deftest fast-demo-key-series-help-buffer ()
"Action key on C-hA brings up help buffer for action key."
@@ -696,5 +733,101 @@ enough files with matching mode loaded."
;; no-byte-compile: t
;; End:
+
+;; Fast Demo Grep Messages, Stack Trace, Man Page Apropos
+(ert-deftest fast-demo-grep ()
+ "Verify ibuts from grep searches works."
+ (unwind-protect
+ (with-temp-buffer
+ (insert "hactypes.el:454:
(mapcar #'list (gbut:label-list))\nhbut.el:605:
(mapcar #'list (gbut:label-list))\n")
+ (goto-char 3)
+ (action-key)
+ (should (string= (buffer-name (current-buffer)) "hactypes.el"))
+ (should (= (line-number-at-pos) 454)))
+ (hy-test-helpers:kill-buffer "hactypes.el")))
+
+(ert-deftest fast-demo-python-trace-back ()
+ "Verify ibuts from python traceback works."
+ (unwind-protect
+ (let ((default-directory hyperb:dir))
+ (with-temp-buffer
+ (insert "Traceback (most recent call last):\n File \"topwin.py\",
line 18, in <module>\n import Quartz\n")
+ (goto-char (point-min))
+ (forward-line 1)
+ (goto-char (+ (point) 3))
+ (action-key)
+ (should (string= (buffer-name (current-buffer)) "topwin.py"))
+ (should (= (line-number-at-pos) 18))))
+ (hy-test-helpers:kill-buffer "topwin.py")))
+
+(ert-deftest fast-demo-man-k ()
+ "Verify ibut in man -k output displays the associated man page."
+ (with-temp-buffer
+ (insert "aspell(1) - interactive spell checker")
+ (goto-char 3)
+ (with-mock
+ (mock (man "aspell(1)") => t)
+ (action-key))))
+
+;; Fast Demo Action Buttons
+(ert-deftest fast-demo-action-button-shell ()
+ "Verify a shell is created when action button for shell is invoked."
+ (unwind-protect
+ (with-temp-buffer
+ (insert "<shell>")
+ (goto-char 3)
+ (action-key)
+ (should (string= (buffer-name (current-buffer)) "*shell*")))
+ (let (kill-buffer-hook kill-buffer-query-functions)
+ (hy-test-helpers:kill-buffer "*shell*"))))
+
+(ert-deftest fast-demo-action-button-fill-column ()
+ "Verify the value of `fill-column' is displayed in the minibuffer."
+ (with-temp-buffer
+ (insert "<fill-column>")
+ (goto-char 2)
+ (action-key)
+ (hy-test-helpers:should-last-message (format "fill-column = %d"
(current-fill-column)))))
+
+(ert-deftest fast-demo-display-demo-using-action-buttons ()
+ "Verify the three ways show in the demo works."
+ (unwind-protect
+ (with-temp-buffer
+ (insert "<find-file-other-window (expand-file-name \"DEMO\"
hyperb:dir)>")
+ (goto-char 5)
+ (let ((enable-local-variables nil))
+ (action-key))
+ (should (string= "DEMO" (buffer-name))))
+ (hy-test-helpers:kill-buffer "DEMO"))
+ (unwind-protect
+ (with-temp-buffer
+ (insert "<hpath:find \"${hyperb:dir}/DEMO\")>")
+ (goto-char 5)
+ (let ((enable-local-variables nil))
+ (action-key))
+ (should (string= "DEMO" (buffer-name))))
+ (hy-test-helpers:kill-buffer "DEMO"))
+ (unwind-protect
+ (with-temp-buffer
+ (insert "\"${hyperb:dir}/DEMO\"") ; Need double quotes - Error!?
+ (goto-char 5)
+ (let ((enable-local-variables nil))
+ (action-key))
+ (should (string= "DEMO" (buffer-name))))
+ (hy-test-helpers:kill-buffer "DEMO")))
+
+(ert-deftest fast-demo-display-kotl-starting-from-cell ()
+ "Verify a kotl file can be displayed from cell ref."
+ (unwind-protect
+ (let ((default-directory hyperb:dir))
+ (with-temp-buffer
+ (insert "<kotl/EXAMPLE.kotl#3b10|c2en>")
+ (goto-char 5)
+ (action-key)
+ (should (string= "EXAMPLE.kotl" (buffer-name)))
+ ;; FIXME: Add verification of lines per cell
+ (should (looking-at-p "Cell Transposition:"))))
+ (hy-test-helpers:kill-buffer "EXAMPLE.kotl")))
+
(provide 'demo-tests)
;;; demo-tests.el ends here
- [elpa] externals/hyperbole 34d4e22f28 087/143: Add tests with more file types and outline structure depth, (continued)
- [elpa] externals/hyperbole 34d4e22f28 087/143: Add tests with more file types and outline structure depth, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 2c67943e47 084/143: Fix a few warnings/bugs pointed out by the byte-compiler, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 2f2d51b816 088/143: Merge pull request #444 from rswgnu/matsl-rsw-add-tests-for-forward-and-backwards-using-multi-file-and-depth-structure, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 7ad3cabb7e 098/143: Revert "Remove skip guard on test that works in batch mode" (#448), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 68564a0f0d 110/143: Enable HyRolo's extended reveal-mode used in *HyRolo* buffer, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 92ee298bf4 111/143: HyRolo - Fix major-mode and reveal-mode issues affecting *HyRolo*, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 5e85e72772 107/143: hyperbole-web-search-alist: Add 'ducKduckgo' search engine, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 2f5d06dd4c 012/143: Add tests for hpath:expand and hpath:expand-list, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole c73e948516 022/143: Merge pull request #422 from rswgnu/matsl-rsw-hui-link-possible-types, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole f4fccc5abf 025/143: Merge pull request #423 from rswgnu/matsl-rsw-ignore-local-vars-in-demo, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole d4c881007b 035/143: Add remaining test cases for fast-demo,
ELPA Syncer <=
- [elpa] externals/hyperbole 1e8006fc19 053/143: Fix more regexps and remove not working visibility check, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 1e1d2950e4 041/143: hyperbole.texi - add doc for Smark Key handling in ERT result bufs, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 9c25ca128a 051/143: Add test for moving up from sub header, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole f098816abd 055/143: Add hsys-flymake.el; fix text-toc actype and {C-u C-h A}, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 1154b391e3 011/143: Fix link-to-regexp-match to use 'n' count during regexp search, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole bd5f59b2e0 016/143: hyrolo-mode-map - add [ and ] keys to move to prev and next @loc>, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 71aa8f2587 018/143: Add test for hui:link-possible-types, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole d59f27c469 026/143: Fix most remaining outstanding issues in HyRolo, ibut-link-directly, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 46d8da0039 019/143: Fix test as ebut is being identified correctly, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 0798e16ab0 030/143: Fix doc on switch of cross-window drags create ibuts with Action Key., ELPA Syncer, 2024/02/19