spacemacs/tests/core/core-configuration-layer-ftest.el
syl20bnr 8e897f6b7b core: new layer spacemacs-bootstrap and new package :step
New package :step 'bootstrap', this step happens before 'pre' packages.
A new layer names 'spacemacs-bootstrap' gather all the ':step bootstrap'
packages. This layer is special and is always the first element of
the variable 'configuration-layer--layers' which assure that all
bootstrap packages are configured first.

This new layer leverages the configuration layer system, removes the
clutter of package installations in the function 'spacemacs/init' and
isolate the bootstrap packages in one place.
2016-04-03 00:28:47 -04:00

44 lines
1.9 KiB
EmacsLisp

;;; core-configuration-layer-ftest.el --- Spacemacs Functional Test File
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(require 'core-configuration-layer)
;; ---------------------------------------------------------------------------
;; configuration-layer//declare-layers
;; ---------------------------------------------------------------------------
(ert-deftest test-declare-layers--bootstrap-layer-always-first ()
(let ((dotspacemacs-distribution 'spacemacs)
(dotspacemacs-configuration-layers '(emacs-lisp
(git :variables foo 'bar))))
(configuration-layer//declare-layers)
(should (eq 'spacemacs-bootstrap
(oref (first configuration-layer--layers) :name)))))
(ert-deftest test-declare-layers--bootstrap-layer-always-first-all ()
(let ((dotspacemacs-distribution 'spacemacs)
(dotspacemacs-configuration-layers 'all))
(configuration-layer//declare-layers)
(should (eq 'spacemacs-bootstrap
(oref (first configuration-layer--layers) :name)))))
(ert-deftest test-declare-layers--distribution-layer-always-second ()
(let ((dotspacemacs-distribution 'spacemacs)
(dotspacemacs-configuration-layers '(emacs-lisp
(git :variables foo 'bar))))
(configuration-layer//declare-layers)
(should (eq 'spacemacs (oref (second configuration-layer--layers) :name)))))
(ert-deftest test-declare-layers--distribution-layer-always-second-all ()
(let ((dotspacemacs-distribution 'spacemacs)
(dotspacemacs-configuration-layers 'all))
(configuration-layer//declare-layers)
(should (eq 'spacemacs (oref (second configuration-layer--layers) :name)))))