mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-30 05:29:52 +08:00
1fb104010c
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.
29 lines
899 B
EmacsLisp
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)
|