melpa/features/step-definitions/melpa-steps.el

42 lines
1.5 KiB
EmacsLisp
Raw Normal View History

2012-12-31 01:11:40 +00:00
(Given "^read recipes$"
(lambda ()
(pb/read-recipes)))
(Given "^capture messages to \\(.+\\)$"
(lambda (varby)
(message "****** %s" varby)
(collect-messages-to varby)))
2013-03-09 15:41:38 +00:00
(Given "^set \\(.+\\) to archive alist$"
(lambda (var)
(set (intern var) (package-build-archive-alist))))
2012-12-31 01:11:40 +00:00
(Then "^\\(.+\\) should be empty"
(lambda (var)
(let ((varsym (intern var)))
2013-03-09 15:41:38 +00:00
(assert (not (eval varsym)) nil "Variable %s is not empty: %s" var (eval varsym)))))
(Given "add \"\\(.+\\)\" to archive alist"
(lambda (var)
(let ((varval (car (read-from-string var))))
(package-build-archive-alist-add var))))
(Given "remove \"\\(.+\\)\" from archive alist"
(lambda (var)
(let ((varval (car (read-from-string var))))
(package-build-archive-alist-remove var))))
(Then "archive alist should be \\(.+\\)$"
(lambda (var)
(let ((varval (car (read-from-string var))))
(assert (equal varval (package-build-archive-alist))
nil "package-build-archive-alist = %s is not equal to %s."
(package-build-archive-alist) varval))))
(Then "archive alist should be \\(.+\\)$"
(lambda (var)
(let ((varval (car (read-from-string var))))
(assert (equal varval (package-build-archive-alist))
nil "package-build-archive-alist = %s is not equal to %s."
(package-build-archive-alist) varval))))