mirror of
https://github.com/correl/melpa.git
synced 2024-11-22 03:00:11 +00:00
add ecukes tests
This commit is contained in:
parent
2bc1dc39ad
commit
b6d30f4376
4 changed files with 85 additions and 0 deletions
8
features/initialization.feature
Normal file
8
features/initialization.feature
Normal file
|
@ -0,0 +1,8 @@
|
|||
Feature: Initialization
|
||||
|
||||
Scenario: read recipes
|
||||
Given read recipes
|
||||
|
||||
Scenario: package-build initialization
|
||||
Given initialization
|
||||
|
22
features/step-definitions/melpa-steps.el
Normal file
22
features/step-definitions/melpa-steps.el
Normal file
|
@ -0,0 +1,22 @@
|
|||
(Given "^initialization$"
|
||||
(lambda ()
|
||||
(package-build-initialize)))
|
||||
|
||||
(Given "^read recipes$"
|
||||
(lambda ()
|
||||
(pb/read-recipes)))
|
||||
|
||||
(Given "^capture messages to \\(.+\\)$"
|
||||
(lambda (varby)
|
||||
(message "****** %s" varby)
|
||||
(collect-messages-to varby)))
|
||||
|
||||
(Given "^package initialization$"
|
||||
(lambda ()
|
||||
(package-initialize)))
|
||||
|
||||
(Then "^\\(.+\\) should be empty"
|
||||
(lambda (var)
|
||||
(message "//////// %s" (eval (intern var)))
|
||||
(let ((varsym (intern var)))
|
||||
(assert (not (eval varsym)) nil "Variable %s is not empty." var))))
|
43
features/support/env.el
Normal file
43
features/support/env.el
Normal file
|
@ -0,0 +1,43 @@
|
|||
;; This is an example of how you could set up this file. This setup
|
||||
;; requires a directory called util in the project root and that the
|
||||
;; util directory contains the testing tools ert and espuds.
|
||||
|
||||
(let* ((features-directory
|
||||
(file-name-directory
|
||||
(directory-file-name (file-name-directory load-file-name))))
|
||||
(project-directory
|
||||
(file-name-directory
|
||||
(directory-file-name features-directory))))
|
||||
(setq melpa-root-path project-directory)
|
||||
(setq melpa-util-path (expand-file-name "util" melpa-root-path)))
|
||||
|
||||
(add-to-list 'load-path melpa-root-path)
|
||||
(add-to-list 'load-path (expand-file-name "espuds" melpa-util-path))
|
||||
|
||||
(require 'package-build)
|
||||
(require 'ert)
|
||||
(require 'espuds)
|
||||
|
||||
|
||||
(Setup
|
||||
;; Before anything has run
|
||||
)
|
||||
|
||||
(Before
|
||||
;; Before each scenario is run
|
||||
(defmacro collect-messages-to (var)
|
||||
(let ((varsym (intern (eval var))))
|
||||
(set varsym '())
|
||||
`(defadvice message (before message (format-string &rest args) activate)
|
||||
(add-to-list ',varsym (ignore-errors (format format-string args))))
|
||||
))
|
||||
)
|
||||
|
||||
(After
|
||||
;; After each scenario is run
|
||||
)
|
||||
|
||||
(Teardown
|
||||
;; After when everything has been run
|
||||
)
|
||||
|
12
run-travis-ci.sh
Executable file
12
run-travis-ci.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
ECUKES_EMACS=${EMACS:-$(which emacs)}
|
||||
|
||||
echo "*** Emacs version ***"
|
||||
echo "ECUKES_EMACS = $ECUKES_EMACS"
|
||||
"$ECUKES_EMACS" --version
|
||||
echo
|
||||
|
||||
exec ./util/ecukes/ecukes --graphical
|
Loading…
Reference in a new issue