From 0d9b3490912f83f75462d14eb8abb320fb901661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Codru=C8=9B=20Constantin=20Gu=C8=99oi?= Date: Wed, 9 May 2018 00:35:27 +0300 Subject: [PATCH] Fixes CI failure Since the introduction of `spacemacs-bootstrap`, the position of layers inside `configuration-layer--used-layers` was shifted by 1 to the right. The test changes account for that now, and the names were changed to indicate they are related to testing the `spacemacs-base` distribution, since the complete `spacemacs` distribution has other layers in between bootstrap and defaults. --- tests/core/core-configuration-layer-ftest.el | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/core/core-configuration-layer-ftest.el b/tests/core/core-configuration-layer-ftest.el index 0ddcaa98b..752a99167 100644 --- a/tests/core/core-configuration-layer-ftest.el +++ b/tests/core/core-configuration-layer-ftest.el @@ -25,7 +25,17 @@ (should (eq 'spacemacs-bootstrap (first configuration-layer--used-layers))))) -(ert-deftest test-declare-layers--distribution-layer-is-second () +(ert-deftest test-declare-layers--defaults-layer-is-second-for-base-distribution () + (let ((dotspacemacs-distribution 'spacemacs-base) + (dotspacemacs-configuration-layers '(emacs-lisp + (git :variables foo 'bar))) + configuration-layer--used-layers + (configuration-layer--indexed-layers (make-hash-table :size 1024))) + (configuration-layer/discover-layers 'refresh-index) + (configuration-layer//declare-used-layers dotspacemacs-configuration-layers) + (should (eq 'spacemacs-defaults (second configuration-layer--used-layers))))) + +(ert-deftest test-declare-layers--base-layer-is-third-for-base-distribution () (let ((dotspacemacs-distribution 'spacemacs-base) (dotspacemacs-configuration-layers '(emacs-lisp (git :variables foo 'bar))) @@ -33,7 +43,7 @@ (configuration-layer--indexed-layers (make-hash-table :size 1024))) (configuration-layer/discover-layers 'refresh-index) (configuration-layer//declare-used-layers dotspacemacs-configuration-layers) - (should (eq 'spacemacs-base (second configuration-layer--used-layers))))) + (should (eq 'spacemacs-base (third configuration-layer--used-layers))))) ;; --------------------------------------------------------------------------- ;; Lazy installation of layers