summaryrefslogtreecommitdiff
path: root/test/hy-test-dependencies.el
blob: e3767ca8767cb66ed9910c1c580e4013086416df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
;;; hy-test-dependencies.el --- Hyperbole test dependencies      -*- lexical-binding: t; -*-

;; Author:       Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date:    20-Feb-21 at 23:16:00
;; Last-Mod:     21-Jun-23 at 21:19:45 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
;; Copyright (C) 2021  Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
;;
;; This file is part of GNU Hyperbole.

;;; Commentary:
;;
;; Load prerequisites for running the tests.

;;; Code:

(require 'hload-path)
(add-to-list 'load-path (expand-file-name "test" hyperb:dir))

(package-initialize)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))

(defun hy-test-ensure-package-installed (pkg-symbol)
  (unless (package-installed-p pkg-symbol)
    (package-refresh-contents)
    (package-install pkg-symbol)))

(mapc (lambda (sym) (hy-test-ensure-package-installed sym))
      '(el-mock package-lint with-simulated-input))

(provide 'hy-test-dependencies)
;;; hy-test-dependencies.el ends here