diff --git a/lisp/_prepare.el b/lisp/_prepare.el index a57f8477..6db4c69b 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -1028,7 +1028,7 @@ This uses function `locate-dominating-file' to look up directory tree." ;; for the sandbox. (eask-with-verbosity 'debug (eask-ignore-errors ; Again, without Eask-file needed! - (if (eask-file-try-load "../") + (if (eask-file-try-load "./") (eask-msg "✓ Loading global Eask file in %s... done!" eask-file) (eask-msg "✗ Loading global Eask file... missing!"))) (eask-msg "")) diff --git a/lisp/core/status.el b/lisp/core/status.el index f5899bd4..28365f32 100644 --- a/lisp/core/status.el +++ b/lisp/core/status.el @@ -25,7 +25,7 @@ (defun eask--environment-name () "Get the working environment name." - (cond ((eask-global-p) "global (~/.eask/)") + (cond ((eask-global-p) "global (~/)") ((eask-config-p) (format "configuration (%s)" user-emacs-directory)) (t "development (./)"))) diff --git a/src/util.js b/src/util.js index 414278aa..654537d9 100644 --- a/src/util.js +++ b/src/util.js @@ -185,7 +185,7 @@ function el_script(name) { */ function _environment_name (argv) { if (argv.global) - return 'global (~/.eask/)'; + return 'global (~/)'; else if (argv.config) return 'configuration (~/.emacs.d/)'; else diff --git a/test/commands/config/run.sh b/test/commands/config/run.sh index 57bbfb33..bd599f1b 100644 --- a/test/commands/config/run.sh +++ b/test/commands/config/run.sh @@ -28,7 +28,7 @@ set -e echo "Copy test configuration" -./test/fixtures/mini.emacs.d/scripts/copy_config.sh +./test/fixtures/home/scripts/setup.sh echo "Testing config (~/.emacs.d/) commands..." eask archives -c diff --git a/test/commands/global/run.sh b/test/commands/global/run.sh index 3f130679..c801dd72 100644 --- a/test/commands/global/run.sh +++ b/test/commands/global/run.sh @@ -28,9 +28,9 @@ set -e echo "Copy test configuration" -./test/fixtures/mini.eask/scripts/copy_eask.sh +./test/fixtures/home/scripts/setup.sh -echo "Testing global (~/.eask/) commands..." +echo "Testing global (~/) commands..." eask archives -g eask install -g spinner ivy beacon company fuzzy diff --git a/test/fixtures/mini.eask/.gitignore b/test/fixtures/home/.eask/.gitignore similarity index 100% rename from test/fixtures/mini.eask/.gitignore rename to test/fixtures/home/.eask/.gitignore diff --git a/test/fixtures/mini.eask/init.el b/test/fixtures/home/.eask/init.el similarity index 100% rename from test/fixtures/mini.eask/init.el rename to test/fixtures/home/.eask/init.el diff --git a/test/fixtures/mini.emacs.d/.gitignore b/test/fixtures/home/.emacs.d/.gitignore similarity index 100% rename from test/fixtures/mini.emacs.d/.gitignore rename to test/fixtures/home/.emacs.d/.gitignore diff --git a/test/fixtures/mini.emacs.d/Eask b/test/fixtures/home/.emacs.d/Eask similarity index 100% rename from test/fixtures/mini.emacs.d/Eask rename to test/fixtures/home/.emacs.d/Eask diff --git a/test/fixtures/mini.emacs.d/RADME.md b/test/fixtures/home/.emacs.d/RADME.md similarity index 100% rename from test/fixtures/mini.emacs.d/RADME.md rename to test/fixtures/home/.emacs.d/RADME.md diff --git a/test/fixtures/mini.emacs.d/init.el b/test/fixtures/home/.emacs.d/init.el similarity index 100% rename from test/fixtures/mini.emacs.d/init.el rename to test/fixtures/home/.emacs.d/init.el diff --git a/test/fixtures/home/.gitignore b/test/fixtures/home/.gitignore new file mode 100644 index 00000000..faa60f92 --- /dev/null +++ b/test/fixtures/home/.gitignore @@ -0,0 +1 @@ +!.eask diff --git a/test/fixtures/mini.eask/Eask b/test/fixtures/home/Eask similarity index 83% rename from test/fixtures/mini.eask/Eask rename to test/fixtures/home/Eask index 4227de62..f0b6d57e 100644 --- a/test/fixtures/mini.eask/Eask +++ b/test/fixtures/home/Eask @@ -1,6 +1,6 @@ -(package "mini.eask" +(package "home" "0.0.1" - "Minimal test .eask") + "Minimal test for global config") (website-url "https://github.com/emacs-eask/mini.eask") (keywords "test") diff --git a/test/fixtures/mini.eask/scripts/copy_eask.ps1 b/test/fixtures/home/scripts/setup.ps1 similarity index 72% rename from test/fixtures/mini.eask/scripts/copy_eask.ps1 rename to test/fixtures/home/scripts/setup.ps1 index 6928a560..9a0acf7e 100644 --- a/test/fixtures/mini.eask/scripts/copy_eask.ps1 +++ b/test/fixtures/home/scripts/setup.ps1 @@ -22,4 +22,9 @@ echo "Copy test configuration" mkdir "$env:USERPROFILE/AppData/Roaming/.eask" -robocopy /e "./test/fixtures/mini.eask/" "$env:USERPROFILE/AppData/Roaming/.eask" +robocopy /e "./test/fixtures/home/_eask/" "$env:USERPROFILE/AppData/Roaming/.eask" +robocopy /e "./test/fixtures/home/Eask" "$env:USERPROFILE/AppData/Roaming/Eask" + +echo "Copy test configuration" +mkdir "$env:USERPROFILE/AppData/Roaming/.emacs.d" +robocopy /e "./test/fixtures/home/.emacs.d/" "$env:USERPROFILE/AppData/Roaming/.emacs.d" diff --git a/test/fixtures/mini.eask/scripts/copy_eask.sh b/test/fixtures/home/scripts/setup.sh similarity index 84% rename from test/fixtures/mini.eask/scripts/copy_eask.sh rename to test/fixtures/home/scripts/setup.sh index d6e05ee9..d2c45538 100644 --- a/test/fixtures/mini.eask/scripts/copy_eask.sh +++ b/test/fixtures/home/scripts/setup.sh @@ -23,4 +23,8 @@ # echo "Copy test .eask" -cp -R ./test/fixtures/mini.eask/ ~/.eask +cp -R ./test/fixtures/home/_eask/ ~/.eask +cp -R ./test/fixtures/home/Eask ~/Eask + +echo "Copy test configuration" +cp -R ./test/fixtures/home/.emacs.d/ ~/.emacs.d diff --git a/test/fixtures/mini.emacs.d/scripts/copy_config.ps1 b/test/fixtures/mini.emacs.d/scripts/copy_config.ps1 deleted file mode 100644 index 3dfe49e7..00000000 --- a/test/fixtures/mini.emacs.d/scripts/copy_config.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2022-2023 Jen-Chieh Shen - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -## Commentary: -# -# Copy configuration over to ~/.emacs.d/ -# - -echo "Copy test configuration" -mkdir "$env:USERPROFILE/AppData/Roaming/.emacs.d" -robocopy /e "./test/fixtures/mini.emacs.d/" "$env:USERPROFILE/AppData/Roaming/.emacs.d" diff --git a/test/fixtures/mini.emacs.d/scripts/copy_config.sh b/test/fixtures/mini.emacs.d/scripts/copy_config.sh deleted file mode 100644 index 7519153d..00000000 --- a/test/fixtures/mini.emacs.d/scripts/copy_config.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (C) 2022-2023 Jen-Chieh Shen - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -## Commentary: -# -# Copy configuration over to ~/.emacs.d/ -# - -echo "Copy test configuration" -cp -R ./test/fixtures/mini.emacs.d/ ~/.emacs.d