el-get/test/issues/el-get-issue-642.el
Stephan Creutz f4ce3bc177 Fix several regression tests
Many regression tests broke after the removal of "cl", because they
assumed "cl" is implicitly loaded. Others regression tests broke for
other reasons.

The commit fixes _not_ all regression tests. This is meant to be the
first wave.
2021-11-13 22:57:24 +01:00

31 lines
936 B
EmacsLisp

;; https://github.com/dimitri/el-get/issues/642
;;
;; Reinstall on type change
(require 'cl-lib)
(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))))
(el-get 'sync 'pkg))
(cl-assert (eq 'builtin
(el-get-package-method (el-get-read-package-status-recipe 'pkg)))
t
"Package type should be 'builtin.")
;; Even though "no-op" is an alias for the same behavior as
;; "builtin", they are still considered different types. Thus, this
;; should trigger a reinstall.
(let ((el-get-sources
(list `(:name pkg
:type no-op))))
(el-get-update 'pkg))
(cl-assert (eq 'no-op
(el-get-package-method (el-get-read-package-status-recipe 'pkg)))
t
"Package type should now be 'no-op, not 'builtin.")