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

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

[nongnu] elpa/bash-completion 3210a44081 224/313: Makefile allows specif


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 3210a44081 224/313: Makefile allows specifying the path to bash.
Date: Sat, 3 Dec 2022 10:59:33 -0500 (EST)

branch: elpa/bash-completion
commit 3210a4408191e47d3dba63f604a7d5a3367fa1e0
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>

    Makefile allows specifying the path to bash.
    
    With this change, setting the env variable BASH before running make
    allows pointing the tests to a specific version of bash.
---
 .gitignore                               |  2 +-
 Makefile                                 |  4 +++-
 test/bash-completion-integration-test.el | 39 ++++++++++++++++----------------
 3 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7a0f02ff0c..90fdcfb681 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
 *.elc
 .cask
-
+test/.set-bash-prog.el
diff --git a/Makefile b/Makefile
index a7838802bf..1d414beaf9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 CASK ?= cask
 EMACS ?= emacs
+BASH ?= bash
 
 all: test
 
@@ -10,7 +11,8 @@ test: clean-elc
        ${MAKE} clean-elc
 
 unit:
-       ${CASK} exec ert-runner
+       @echo '(setq bash-completion-prog "${BASH}")' >test/.set-bash-prog.el
+       ${CASK} exec ert-runner -l test/.set-bash-prog.el
 
 compile:
        ${CASK} build
diff --git a/test/bash-completion-integration-test.el 
b/test/bash-completion-integration-test.el
index ae3751d415..cfd338d862 100644
--- a/test/bash-completion-integration-test.el
+++ b/test/bash-completion-integration-test.el
@@ -34,26 +34,25 @@
 (require 'ert)
 
 (defmacro bash-completion_test-harness (bashrc &rest body)
-  `(if (file-executable-p bash-completion-prog)
-     (let ((test-env-dir (bash-completion_test-setup-env ,bashrc)))
-       (let ((bash-completion-processes nil)
-             (bash-completion-nospace nil)
-             (bash-completion-start-files nil)
-             (bash-completion-args
-              (list "--noediting"
-                    "--noprofile"
-                    "--rcfile" (expand-file-name "bashrc" test-env-dir)))
-             (kill-buffer-query-functions '())
-             (minibuffer-message-timeout 0)
-             (default-directory test-env-dir))
-         ;; Give Emacs time to process any input or process state
-         ;; change from bash-completion-reset.
-         (while (accept-process-output nil 0.1))
-         (unwind-protect
-             (progn ,@body)
-           (progn
-             (bash-completion_test-teardown-env test-env-dir)
-             (bash-completion-reset-all)))))))
+  `(let ((test-env-dir (bash-completion_test-setup-env ,bashrc)))
+     (let ((bash-completion-processes nil)
+           (bash-completion-nospace nil)
+           (bash-completion-start-files nil)
+           (bash-completion-args
+            (list "--noediting"
+                  "--noprofile"
+                  "--rcfile" (expand-file-name "bashrc" test-env-dir)))
+           (kill-buffer-query-functions '())
+           (minibuffer-message-timeout 0)
+           (default-directory test-env-dir))
+       ;; Give Emacs time to process any input or process state
+       ;; change from bash-completion-reset.
+       (while (accept-process-output nil 0.1))
+       (unwind-protect
+           (progn ,@body)
+         (progn
+           (bash-completion_test-teardown-env test-env-dir)
+           (bash-completion-reset-all))))))
 
 (defmacro bash-completion_test-with-shell-harness (bashrc &rest body)
   `(bash-completion_test-harness



reply via email to

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