mirror of
https://github.com/correl/melpa.git
synced 2024-12-18 11:06:10 +00:00
update travis tests
This commit is contained in:
parent
23d30ceb0a
commit
374aea3b52
2 changed files with 53 additions and 7 deletions
|
@ -3,6 +3,25 @@ Feature: Initialization
|
|||
Scenario: read recipes
|
||||
Given read recipes
|
||||
|
||||
Scenario: package-build initialization
|
||||
Given initialization
|
||||
Scenario: get archive alist
|
||||
Given set travis-archive-alist to archive alist
|
||||
Then travis-archive-alist should be empty
|
||||
|
||||
Scenario: add to archive alist
|
||||
Given add "test1" to archive alist
|
||||
Then archive alist should be ("test1")
|
||||
Given add "test2" to archive alist
|
||||
Then archive alist should be ("test2" "test1")
|
||||
|
||||
Scenario: remove from archive alist
|
||||
Given add "test1" to archive alist
|
||||
Given remove "test2" from archive alist
|
||||
Then archive alist should be ("test1")
|
||||
Given add "test2" to archive alist
|
||||
Then archive alist should be ("test2" "test1")
|
||||
Given remove "test1" from archive alist
|
||||
Then archive alist should be ("test2")
|
||||
|
||||
|
||||
|
||||
|
|
@ -11,12 +11,39 @@
|
|||
(message "****** %s" varby)
|
||||
(collect-messages-to varby)))
|
||||
|
||||
(Given "^package initialization$"
|
||||
(lambda ()
|
||||
(package-initialize)))
|
||||
(Given "^set \\(.+\\) to archive alist$"
|
||||
(lambda (var)
|
||||
(set (intern var) (package-build-archive-alist))))
|
||||
|
||||
(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))))
|
||||
(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))))
|
||||
|
||||
(Given "archive alist set to \\(.+\\)$"
|
||||
(lambda (var)
|
||||
(package-build-archive-alist (car (read-from-string 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))))
|
||||
|
|
Loading…
Reference in a new issue