el-get/test/el-get-issue-650.el
Ryan C. Thompson 1fb104010c Use setq instead of let in tests
This makes it easier to run tests interactively and inspect the
results afterward, because the variables such as "el-get-sources" that
were set for the tests are still bound to the values they had during
the test.
2012-03-18 12:33:04 -07:00

29 lines
899 B
EmacsLisp

;; https://github.com/dimitri/el-get/issues/650
;;
;; Take more advantage of saved status recipes
;; Define a checksum method just for testing purposes
(defun el-get-builtin-compute-checksum (package &rest ignored)
"A builtin package always has a checksum of zero."
"0")
(el-get-register-derived-method :builtin-with-checksum :builtin
:compute-checksum #'el-get-builtin-compute-checksum)
(setq debug-on-error t
el-get-verbose t
el-get-default-process-sync t)
;; Install pkg with type builtin
(let ((el-get-sources
(list `(:name pkg
:type builtin-with-checksum
:checksum "0"))))
(el-get 'sync 'pkg))
;; Now, with the recipe no longer in `el-get-sources', do a bunch of
;; things that require the recipe, to make sure that they obtain it
;; from the status file.
(el-get-checksum 'pkg)
(el-get-reload 'pkg)
(el-get-remove 'pkg)