[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 96deda39db 05/19: demo-tests.el - Use 'sh' in
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 96deda39db 05/19: demo-tests.el - Use 'sh' instead of 'bash' |
Date: |
Sun, 24 Jul 2022 16:57:37 -0400 (EDT) |
branch: externals/hyperbole
commit 96deda39dbbcf3045130dd2ca178ce45ce3bd78e
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
demo-tests.el - Use 'sh' instead of 'bash'
Replace single backslash with double backslash where appropriate.
Don't kill shell buffer if it exists before the test is invoked.
---
ChangeLog | 7 +++++++
test/demo-tests.el | 40 +++++++++++++++++++++++-----------------
2 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f04b2fb2b9..f7af3a5ec2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
2022-07-19 Mats Lidell <matsl@gnu.org>
+* test/demo-tests.el (fast-demo-key-series-shell-pushd-hyperb-dir,
+ fast-demo-key-series-shell-grep,
+ fast-demo-key-series-shell-apropos):
+ Use 'sh' instead of 'bash' for wider applicability.
+ Don't kill shell buffer if it exists before the test is invoked.
+
+* hact.el (htype:symbol): Return nil if type-category is invalid.
* test/demo-tests.el (fast-demo-key-series-shell-apropos): Add optional
whitespace after command to accomodate for different versions on
diff --git a/test/demo-tests.el b/test/demo-tests.el
index 895dcc8152..76b9c7b2ac 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: 16-Jul-22 at 22:39:47 by Mats Lidell
+;; Last-Mod: 17-Jul-22 at 14:31:49 by Bob Weiner
;;
;; Copyright (C) 2021 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
@@ -531,8 +531,9 @@ enough files with matching mode loaded."
(ert-deftest fast-demo-key-series-shell-pushd-hyperb-dir ()
"Action key executes pushd shell command."
(skip-unless (not noninteractive))
- (let ((shell-file-name (executable-find "bash"))
- (shell-buffer-name "*shell*"))
+ (let* ((shell-file-name (executable-find "sh"))
+ (shell-buffer-name "*shell*")
+ (existing-shell-flag (get-buffer-process shell-buffer-name)))
(unwind-protect
(with-temp-buffer
(insert "{ M-x shell RET M-> (pushd ${hyperb:dir} && echo
\"PWD=$(pwd)\") RET }")
@@ -546,14 +547,16 @@ enough files with matching mode loaded."
(while (not (search-forward "PWD=" nil t))
(accept-process-output (get-buffer-process
shell-buffer-name))))
(should (looking-at-p (directory-file-name hyperb:dir)))))
- (set-process-query-on-exit-flag (get-buffer-process shell-buffer-name)
nil)
- (kill-buffer shell-buffer-name))))
+ (unless existing-shell-flag
+ (set-process-query-on-exit-flag (get-buffer-process shell-buffer-name)
nil)
+ (kill-buffer shell-buffer-name)))))
(ert-deftest fast-demo-key-series-shell-grep ()
"Action key executes grep shell command."
(skip-unless (not noninteractive))
- (let ((shell-file-name (executable-find "bash"))
- (shell-buffer-name "*shell*"))
+ (let* ((shell-file-name (executable-find "sh"))
+ (shell-buffer-name "*shell*")
+ (existing-shell-flag (get-buffer-process shell-buffer-name)))
(unwind-protect
(with-temp-buffer
(insert "{M-x shell RET M-> (export HYPERBOLE_DIR=${hyperb:dir} &&
cd $HYPERBOLE_DIR && grep -n gbut:label-list *.el) RET}")
@@ -562,17 +565,19 @@ enough files with matching mode loaded."
(hy-test-helpers:consume-input-events)
(with-current-buffer shell-buffer-name
(with-timeout (5 (ert-fail "Test timed out"))
- (while (not (string-match-p
"\n.*\.el:[0-9]+:.*defun.*gbut:label-list \(\)" (buffer-substring-no-properties
(point-min) (point-max))))
+ (while (not (string-match-p
"\n.*\\.el:[0-9]+:.*defun.*gbut:label-list ()" (buffer-substring-no-properties
(point-min) (point-max))))
(accept-process-output (get-buffer-process
shell-buffer-name))))
- (should (string-match-p "\n.*\.el:[0-9]+:.*defun.*gbut:label-list
\(\)" (buffer-substring-no-properties (point-min) (point-max))))))
- (set-process-query-on-exit-flag (get-buffer-process shell-buffer-name)
nil)
- (kill-buffer shell-buffer-name))))
+ (should (string-match-p "\n.*\\.el:[0-9]+:.*defun.*gbut:label-list
()" (buffer-substring-no-properties (point-min) (point-max))))))
+ (unless existing-shell-flag
+ (set-process-query-on-exit-flag (get-buffer-process shell-buffer-name)
nil)
+ (kill-buffer shell-buffer-name)))))
(ert-deftest fast-demo-key-series-shell-apropos ()
"Action key executes apropos shell command."
(skip-unless (not noninteractive))
- (let ((shell-file-name (executable-find "bash"))
- (shell-buffer-name "*shell*"))
+ (let* ((shell-file-name (executable-find "sh"))
+ (shell-buffer-name "*shell*")
+ (existing-shell-flag (get-buffer-process shell-buffer-name)))
(unwind-protect
(with-temp-buffer
(insert "{M-x shell RET M-> (apropos grep) RET}")
@@ -581,11 +586,12 @@ enough files with matching mode loaded."
(hy-test-helpers:consume-input-events)
(with-current-buffer shell-buffer-name
(with-timeout (5 (ert-fail "Test timed out"))
- (while (not (string-match-p "\ngrep ?\(1\).*-"
(buffer-substring-no-properties (point-min) (point-max))))
+ (while (not (string-match-p "\ngrep ?(1).*-"
(buffer-substring-no-properties (point-min) (point-max))))
(accept-process-output (get-buffer-process
shell-buffer-name))))
- (should (string-match-p "\ngrep ?\(1\).*-"
(buffer-substring-no-properties (point-min) (point-max))))))
- (set-process-query-on-exit-flag (get-buffer-process shell-buffer-name)
nil)
- (kill-buffer shell-buffer-name))))
+ (should (string-match-p "\ngrep ?(1).*-"
(buffer-substring-no-properties (point-min) (point-max))))))
+ (unless existing-shell-flag
+ (set-process-query-on-exit-flag (get-buffer-process shell-buffer-name)
nil)
+ (kill-buffer shell-buffer-name)))))
;; This file can't be byte-compiled without the `el-mock' package (because of
;; the use of the `with-mock' macro), which is not a dependency of Hyperbole.
- [elpa] externals/hyperbole updated (89913d256c -> 75c9214c35), ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 2d2fcb97d9 04/19: Add a number of small updates with little functional change, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 96deda39db 05/19: demo-tests.el - Use 'sh' instead of 'bash',
ELPA Syncer <=
- [elpa] externals/hyperbole c9a58fc673 01/19: hsys-youtube.el: Add action button types for Youtube videos, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole d0dd9202d8 06/19: HyRolo search org-directory, org-roam files or with helm-org-rifle, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 44262d14a7 14/19: Resolve all but one test case issues from the latest updates, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 80d1d2dd4c 12/19: Update tests to work with new ibut:create code, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c38d137510 03/19: Merge branch 'master' of hyperbole, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole e9015341c0 08/19: hypb.el: Support devdocs-lookup package, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 4860da0802 07/19: hsettings.el (hyperbole-web-search): Add flag to return search expr, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 72ca3f0041 10/19: hui-mini.el: Multi-line menu support; add To/ and Doc a-z menus, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 7a86ea33e2 09/19: Add ibut:create and allow Assist Key :help for Elisp functions, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c517641b51 18/19: * ibut:create Ensure lbl-key is always set to name, if available, ELPA Syncer, 2022/07/24