From 0d4daf4cadf6531088b501409cb5fefbbe836813 Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Mon, 17 Mar 2025 14:38:34 -0700 Subject: [PATCH 01/10] Fix: typo in some error messages --- lisp/_prepare.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/_prepare.el b/lisp/_prepare.el index 183f0883..101ec5d1 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -1870,14 +1870,14 @@ Arguments FNC and ARGS are used for advice `:around'." (erase-buffer) (insert buf-str)) (eask--help-display))) - (eask-error "Help manual missig %s" help-file)))) + (eask-error "Help manual missing %s" help-file)))) ;; ;;; Checker (defun eask--checker-existence () "Return errors if required metadata is missing." - (unless eask-package (eask-error "Missing metadata package; make sure you have create Eask-file with $ eask init!"))) + (unless eask-package (eask-error "Missing metadata package; make sure you have created an Eask-file with $ eask init!"))) (defun eask--check-strings (fmt f p &rest args) "Test strings (F and P); then print FMT and ARGS if not equal." From 963281b6b6ee52c5117118102464bc27aa6492e9 Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Mon, 17 Mar 2025 14:50:20 -0700 Subject: [PATCH 02/10] Fix: minor style changes in lisp/help files Call eask--exit when the message indicates an error --- lisp/help/core/analyze | 4 ++-- lisp/help/core/concat | 2 +- lisp/help/core/docs | 2 +- lisp/help/core/eval | 2 +- lisp/help/core/exec | 4 ++-- lisp/help/core/info | 2 +- lisp/help/core/install-deps | 2 +- lisp/help/core/recipe | 2 +- lisp/help/core/reinstall | 14 +++++++------- lisp/help/core/search | 2 +- lisp/help/core/uninstall | 2 +- lisp/help/format/elfmt | 4 ++-- lisp/help/format/elisp-autofmt | 4 ++-- lisp/help/link/add/error | 2 +- lisp/help/lint/checkdoc | 4 ++-- lisp/help/lint/declare | 4 ++-- lisp/help/lint/elint | 10 +++++----- lisp/help/lint/elisp-lint | 10 +++++----- lisp/help/lint/elsa | 10 +++++----- lisp/help/lint/indent | 10 +++++----- lisp/help/lint/package | 10 +++++----- lisp/help/lint/regexps | 10 +++++----- lisp/help/run/command | 2 +- lisp/help/source/add | 4 +--- lisp/help/test/ert | 2 +- lisp/help/test/melpazoid | 2 +- 26 files changed, 62 insertions(+), 64 deletions(-) diff --git a/lisp/help/core/analyze b/lisp/help/core/analyze index ca4d89cf..2643ccd1 100644 --- a/lisp/help/core/analyze +++ b/lisp/help/core/analyze @@ -1,4 +1,4 @@ - -💡 You need to specify file(s) you want to Eask checker to check + +💡 You need to specify file(s) you want Eask checker to check $ eask analyze FILE-1 FILE-2 diff --git a/lisp/help/core/concat b/lisp/help/core/concat index a5a79357..8a82d7e0 100644 --- a/lisp/help/core/concat +++ b/lisp/help/core/concat @@ -1,4 +1,4 @@ -💡 You would need to specify the [names..] in order to make concatenation! +💡 You need to specify the file [names..] in order to concatenate! $ eask concat [names..] diff --git a/lisp/help/core/docs b/lisp/help/core/docs index c0c7cc30..b5f3092e 100644 --- a/lisp/help/core/docs +++ b/lisp/help/core/docs @@ -1,4 +1,4 @@ -💡 You would need to specify the [names..] in order to build documentation! +💡 You need to specify the file [names..] in order to build documentation! $ eask docs [names..] diff --git a/lisp/help/core/eval b/lisp/help/core/eval index 1fcb916f..12a3b7e9 100644 --- a/lisp/help/core/eval +++ b/lisp/help/core/eval @@ -1,4 +1,4 @@ -💡 You would need to specify the [form] in order to make execution! +💡 You need to specify the [form] to evaluate! $ eask eval [form] diff --git a/lisp/help/core/exec b/lisp/help/core/exec index b8c7e2c4..7a84922d 100644 --- a/lisp/help/core/exec +++ b/lisp/help/core/exec @@ -1,4 +1,4 @@ -💡 You would need to specify the program name in order to make execution! - +💡 You need to specify the program name to execute! + $ eask exec [options..] diff --git a/lisp/help/core/info b/lisp/help/core/info index 377cec8d..837939c6 100644 --- a/lisp/help/core/info +++ b/lisp/help/core/info @@ -1,5 +1,5 @@ -💡 You need Eask-file to show information about the config/package, to create one: +💡 You need an Eask-file to show information about the config/package; to create one: $ eask init diff --git a/lisp/help/core/install-deps b/lisp/help/core/install-deps index af0c3343..41a730c0 100644 --- a/lisp/help/core/install-deps +++ b/lisp/help/core/install-deps @@ -1,4 +1,4 @@ -💡 You can add dependencies by using specifier [depends-on] +💡 You can add dependencies by using the specifier [depends-on] [+] (depends-on "PKG-SPEC") diff --git a/lisp/help/core/recipe b/lisp/help/core/recipe index 8f5ee81e..2e38af21 100644 --- a/lisp/help/core/recipe +++ b/lisp/help/core/recipe @@ -1,5 +1,5 @@ -💡 Please specify URL: in your main package file +💡 Please specify URL in your main package file: [+] ;; URL: https://example.com/your/repo/url diff --git a/lisp/help/core/reinstall b/lisp/help/core/reinstall index cf35f482..11cd764f 100644 --- a/lisp/help/core/reinstall +++ b/lisp/help/core/reinstall @@ -1,13 +1,13 @@ - -💡 Make sure you have specify a (package-file ..) directive inside your Eask file! - + +💡 Make sure you have specified a (package-file ..) directive inside your Eask file! + [+] (package-file "PKG-MAIN.el") - + 💡 Or specify package names as arguments - + $ eask reinstall PKG-1 PKG-2 - -💡 You would need to first install packages before reinstalling! + +💡 You first need to install packages before reinstalling! Try the command: diff --git a/lisp/help/core/search b/lisp/help/core/search index 8f9c52ba..135a38b3 100644 --- a/lisp/help/core/search +++ b/lisp/help/core/search @@ -1,4 +1,4 @@ -💡 You would need to specify queries to do search operations +💡 You need to specify queries to search for $ eask search QUERY-1 QUERY-2 .. diff --git a/lisp/help/core/uninstall b/lisp/help/core/uninstall index 81cf0144..c8f525d0 100644 --- a/lisp/help/core/uninstall +++ b/lisp/help/core/uninstall @@ -1,6 +1,6 @@ -💡 Make sure you have specify a (package-file ..) inside your Eask file! +💡 Make sure you have specified a (package-file ..) inside your Eask file! [+] (package-file "PKG-MAIN.el") 💡 Or specify package names as arguments diff --git a/lisp/help/format/elfmt b/lisp/help/format/elfmt index b905269a..cb757aa8 100644 --- a/lisp/help/format/elfmt +++ b/lisp/help/format/elfmt @@ -1,9 +1,9 @@ -💡 You need to specify file(s) you want the elfmt to run +💡 You need to specify file(s) you want elfmt to format $ eask format elfmt FILE-1 FILE-2 -💡 Or edit Eask file with [package-file] or [files] specifier +💡 Or edit the Eask-file with [package-file] or [files] specifier [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns diff --git a/lisp/help/format/elisp-autofmt b/lisp/help/format/elisp-autofmt index dd9d9061..d9e6ff4f 100644 --- a/lisp/help/format/elisp-autofmt +++ b/lisp/help/format/elisp-autofmt @@ -1,9 +1,9 @@ -💡 You need to specify file(s) you want the elisp-autofmt to run +💡 You need to specify file(s) you want elisp-autofmt to format $ eask format elisp-autofmt FILE-1 FILE-2 -💡 Or edit Eask file with [package-file] or [files] specifier +💡 Or edit the Eask-file with [package-file] or [files] specifier [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns diff --git a/lisp/help/link/add/error b/lisp/help/link/add/error index af8980f5..3d824ed3 100644 --- a/lisp/help/link/add/error +++ b/lisp/help/link/add/error @@ -1,6 +1,6 @@ -💡 You need the `-pkg.el` file so the `package.el` can recognize your package. +💡 You need the `-pkg.el` file so that `package.el` can recognize your package. Options are, - [ ] Use `eask generate pkg-file` to create one diff --git a/lisp/help/lint/checkdoc b/lisp/help/lint/checkdoc index f3dc5d37..0e8b42e7 100644 --- a/lisp/help/lint/checkdoc +++ b/lisp/help/lint/checkdoc @@ -1,9 +1,9 @@ -💡 You need to specify file(s) you want the checkdoc to run +💡 You need to specify file(s) you want checkdoc to run $ eask lint checkdoc FILE-1 FILE-2 -💡 Or edit Eask file with [package-file] or [files] specifier +💡 Or edit the Eask-file with [package-file] or [files] specifier [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns diff --git a/lisp/help/lint/declare b/lisp/help/lint/declare index 3f8aa2ee..0e63501a 100644 --- a/lisp/help/lint/declare +++ b/lisp/help/lint/declare @@ -1,9 +1,9 @@ -💡 You need to specify file(s) you want the check-declare to run +💡 You need to specify file(s) you want check-declare to check $ eask lint declare FILE-1 FILE-2 -💡 Or edit Eask file with [package-file] or [files] specifier +💡 Or edit the Eask-file with [package-file] or [files] specifier [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns diff --git a/lisp/help/lint/elint b/lisp/help/lint/elint index d656dac1..4bc1284b 100644 --- a/lisp/help/lint/elint +++ b/lisp/help/lint/elint @@ -1,13 +1,13 @@ - -💡 You need to specify file(s) you want the elint to run - + +💡 You need to specify file(s) you want elint to check + [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns For example, - + [+] (files "*.el") 💡 Tip: You can use the command [files] to show all selected files - + $ eask files diff --git a/lisp/help/lint/elisp-lint b/lisp/help/lint/elisp-lint index 6d9f6ce6..2263dde5 100644 --- a/lisp/help/lint/elisp-lint +++ b/lisp/help/lint/elisp-lint @@ -1,13 +1,13 @@ - -💡 You need to specify file(s) you want the elisp-lint to run - + + +💡 You need to specify file(s) you want elisp-lint to check [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns For example, - + [+] (files "*.el") 💡 Tip: You can use the command [files] to show all selected files - + $ eask files diff --git a/lisp/help/lint/elsa b/lisp/help/lint/elsa index 386e3dd5..7ba4cf31 100644 --- a/lisp/help/lint/elsa +++ b/lisp/help/lint/elsa @@ -1,13 +1,13 @@ - -💡 You need to specify file(s) you want the elsa to run - + +💡 You need to specify file(s) you want elsa to check + [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns For example, - + [+] (files "*.el") 💡 Tip: You can use the command [files] to show all selected files - + $ eask files diff --git a/lisp/help/lint/indent b/lisp/help/lint/indent index 8582960a..b80e2cfc 100644 --- a/lisp/help/lint/indent +++ b/lisp/help/lint/indent @@ -1,13 +1,13 @@ - -💡 You need to specify file(s) you want the indent-lint to run - + + +💡 You need to specify file(s) you want indent-lint to check [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns For example, - + [+] (files "*.el") 💡 Tip: You can use the command [files] to show all selected files - + $ eask files diff --git a/lisp/help/lint/package b/lisp/help/lint/package index fbd5000f..445b35cc 100644 --- a/lisp/help/lint/package +++ b/lisp/help/lint/package @@ -1,13 +1,13 @@ - -💡 You need to specify file(s) you want the package-lint to run - + +💡 You need to specify file(s) you want package-lint to check + [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns For example, - + [+] (files "*.el") 💡 Tip: You can use the command [files] to show all selected files - + $ eask files diff --git a/lisp/help/lint/regexps b/lisp/help/lint/regexps index cfe34167..002daaef 100644 --- a/lisp/help/lint/regexps +++ b/lisp/help/lint/regexps @@ -1,13 +1,13 @@ - -💡 You need to specify file(s) you want the relint to run - + +💡 You need to specify file(s) you want relint to check + [+] (package-file "ENTRY") ; One argument with a string [+] (files "FILE-1" "FILE-2" ...) ; All arguments are wildcard patterns For example, - + [+] (files "*.el") 💡 Tip: You can use the command [files] to show all selected files - + $ eask files diff --git a/lisp/help/run/command b/lisp/help/run/command index 4e80b7c1..b7f81d31 100644 --- a/lisp/help/run/command +++ b/lisp/help/run/command @@ -1,5 +1,5 @@ -💡 Make sure you have specify a (eask-defcommand ..) function inside your Eask file! +💡 Make sure you have specified a (eask-defcommand ..) function inside your Eask file! [+] (eask-defcommand my-command [+] "This is a test command." diff --git a/lisp/help/source/add b/lisp/help/source/add index bd897e92..e2b93206 100644 --- a/lisp/help/source/add +++ b/lisp/help/source/add @@ -1,7 +1,5 @@ -💡 The given source name is not found in our database. You have following options: - -Options are, +💡 The given source name is not found in our database. You have the following options: - [ ] Pass in one extra argument to specify an `[url]` - [ ] Edit variable `eask-source-mapping` and create a pull request to https://github.com/emacs-eask/cli diff --git a/lisp/help/test/ert b/lisp/help/test/ert index 44a7e18e..97ae201f 100644 --- a/lisp/help/test/ert +++ b/lisp/help/test/ert @@ -1,4 +1,4 @@ -💡 You need to specify the file(s) you want the ert to run: +💡 You need to specify the file(s) you want ert to run: $ eask test ert FILE-1 FILE-2 diff --git a/lisp/help/test/melpazoid b/lisp/help/test/melpazoid index f243dd34..4b6a3563 100644 --- a/lisp/help/test/melpazoid +++ b/lisp/help/test/melpazoid @@ -1,4 +1,4 @@ -💡 You need to specify the directory(ies) you want the melpazoid to run: +💡 You need to specify the directory(ies) you want melpazoid to run: $ eask test melpazoid DIR-1 DIR2 From 78b5f9272996c81313b818ea79106bc7ff35507c Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Mon, 17 Mar 2025 14:50:42 -0700 Subject: [PATCH 03/10] Fix: bad help file link for analyze command --- lisp/core/analyze.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/core/analyze.el b/lisp/core/analyze.el index 4b0b9fea..dbede6dd 100644 --- a/lisp/core/analyze.el +++ b/lisp/core/analyze.el @@ -152,6 +152,6 @@ Argument LEVEL and MSG are data from the debug log signal." ;; Default, print help! (t (eask-info "(No Eask-files have been checked)") - (eask-help "checker/analyze")))) + (eask-help "core/analyze")))) ;;; core/analyze.el ends here From 01d91dcf6322ee015be3daf356c5cead1fe158eb Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Mon, 17 Mar 2025 18:18:59 -0700 Subject: [PATCH 04/10] Add exit-code param to eask--exit --- lisp/_prepare.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/_prepare.el b/lisp/_prepare.el index 101ec5d1..8f2bb96f 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -1727,7 +1727,9 @@ Argument ARGS are direct arguments for functions `eask-error' or `eask-warn'." (declare (indent 0) (debug t)) `(eask-ignore-errors (eask--silent-error ,@body))) -(defun eask--exit (&rest _) "Send exit code." (kill-emacs 1)) +(defun eask--exit (&optional exit-code &rest _) + "Kill Emacs with EXIT-CODE (default 1)." + (kill-emacs (or exit-code 1))) (defun eask--trigger-error () "Trigger error event." From 8a5aa79379ea74307dec00565a85fd9406598b2e Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Tue, 18 Mar 2025 20:48:22 -0700 Subject: [PATCH 05/10] Add exit-code param to eask-help --- lisp/_prepare.el | 23 +++++++++++++++++++---- lisp/link/add.el | 4 ++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/lisp/_prepare.el b/lisp/_prepare.el index 8f2bb96f..bb6c650d 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -1860,10 +1860,21 @@ Arguments FNC and ARGS are used for advice `:around'." (eask-msg (ansi-white (buffer-string))) (eask-msg (concat "''" (spaces-string max-column) "''")))) -(defun eask-help (command) - "Show COMMAND's help instruction." +(defun eask-help (command &optional print-or-exit-code) + "Show COMMAND's help instruction. + +When the optional variable PRINT-OR-EXIT-CODE is a number, it will exit with +that code. Set to non-nil would just print the help message without sending +the exit code. The default value `nil' will be replaced by `1'; therefore +would send exit code of `1'." (let* ((command (eask-2str command)) ; convert to string - (help-file (concat eask-lisp-root "help/" command))) + (help-file (concat eask-lisp-root "help/" command)) + ;; The default exit code is `1' since `eask-help' prints the help + ;; message on user error 99% of the time. + ;; + ;; TODO: Later replace exit code `1' with readable symbol after + ;; the exit code has specified. + (print-or-exit-code (or print-or-exit-code 1))) (if (file-exists-p help-file) (with-temp-buffer (insert-file-contents help-file) @@ -1871,7 +1882,11 @@ Arguments FNC and ARGS are used for advice `:around'." (let ((buf-str (eask--msg-displayable-kwds (buffer-string)))) (erase-buffer) (insert buf-str)) - (eask--help-display))) + (eask--help-display)) + ;; Exit with code if needed + (cond ((numberp print-or-exit-code) + (eask--exit print-or-exit-code)) + (t ))) ; Don't exit with anything else. (eask-error "Help manual missing %s" help-file)))) ;; diff --git a/lisp/link/add.el b/lisp/link/add.el index a8c589af..d2f7a81b 100644 --- a/lisp/link/add.el +++ b/lisp/link/add.el @@ -83,7 +83,7 @@ (eask-link-add--create source) (when (and (zerop (length links)) ; if no link previously, (= 1 (length (eask-link-list)))) ; and first link created! - (eask-help "link/add/success/pkg"))) + (eask-help "link/add/success/pkg" t))) ;; don't error ((ignore-errors (file-exists-p pkg-eask)) (eask-log "💡 Validating package through %s... done!" pkg-eask) (eask--save-load-eask-file pkg-eask @@ -113,7 +113,7 @@ (eask-link-add--create source) (when (and (zerop (length links)) ; if no link previously, (= 1 (length (eask-link-list)))) ; and first link created! - (eask-help "link/add/success/eask"))) + (eask-help "link/add/success/eask" t))) ;; don't error (eask-error "✗ Error loading Eask-file: %s" pkg-eask))) (t (eask-info "(Missing `%s-pkg.el` file in your source folder)" name) From 2564bf64dde33cfd9c103ab2f49f8b5a1e3747f9 Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Tue, 18 Mar 2025 12:18:23 -0700 Subject: [PATCH 06/10] Fix: typo in run script cli doc --- cmds/run/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/run/script.js b/cmds/run/script.js index d5370498..f9365ab9 100644 --- a/cmds/run/script.js +++ b/cmds/run/script.js @@ -21,7 +21,7 @@ const fs = require('fs'); const child_process = require("child_process"); exports.command = ['script [names..]']; -exports.desc = 'Run script nameds [names..]'; +exports.desc = 'Run script named [names..]'; exports.builder = yargs => yargs .positional( '[names..]', { From a7dd34bfd491a37576ff98421656b21ef9fb0f6a Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Tue, 18 Mar 2025 12:36:35 -0700 Subject: [PATCH 07/10] Add tests for exit status when displaying help message --- Makefile | 41 ++++++++++++++++++- test/commands/analyze/error/run.sh | 31 +++++++++++++++ test/commands/bump/run.sh | 31 +++++++++++++++ test/commands/compile/run.sh | 30 ++++++++++++++ test/commands/concat/run.sh | 31 +++++++++++++++ test/commands/docs/run.sh | 31 +++++++++++++++ test/commands/eval/run.sh | 30 ++++++++++++++ test/commands/exec/run.sh | 5 +++ test/commands/format/run.sh | 33 ++++++++++++++++ test/commands/info/run.sh | 29 ++++++++++++++ test/commands/init/run.sh | 39 ++++++++++++++++++ test/commands/install/run.sh | 13 ++++++ test/commands/link/run.sh | 9 +++++ test/commands/lint/run.sh | 52 ++++++++++++++++++++++++ test/commands/recipe/run.sh | 31 +++++++++++++++ test/commands/run/run.sh | 33 ++++++++++++++++ test/commands/search/run.sh | 4 +- test/commands/source/run.sh | 35 ++++++++++++++++ test/commands/test/ert/run.sh | 5 +++ test/fixtures/home/scripts/testing.sh | 57 +++++++++++++++++++++++++++ 20 files changed, 567 insertions(+), 3 deletions(-) create mode 100755 test/commands/analyze/error/run.sh create mode 100755 test/commands/bump/run.sh create mode 100755 test/commands/compile/run.sh create mode 100755 test/commands/concat/run.sh create mode 100755 test/commands/docs/run.sh create mode 100755 test/commands/eval/run.sh mode change 100644 => 100755 test/commands/exec/run.sh create mode 100755 test/commands/format/run.sh create mode 100755 test/commands/info/run.sh create mode 100755 test/commands/init/run.sh mode change 100644 => 100755 test/commands/install/run.sh mode change 100644 => 100755 test/commands/link/run.sh create mode 100755 test/commands/lint/run.sh create mode 100755 test/commands/recipe/run.sh create mode 100755 test/commands/run/run.sh mode change 100644 => 100755 test/commands/search/run.sh create mode 100755 test/commands/source/run.sh create mode 100755 test/fixtures/home/scripts/testing.sh diff --git a/Makefile b/Makefile index d5fa01b9..099bdec8 100644 --- a/Makefile +++ b/Makefile @@ -35,27 +35,64 @@ command-local: command-analyze: ./test/commands/analyze/dsl/run.sh ./test/commands/analyze/metadata/run.sh + ./test/commands/analyze/error/run.sh + +command-bump: + ./test/commands/bump/run.sh + +command-compile: + ./test/commands/compile/run.sh + +command-concat: + ./test/commands/concat/run.sh command-docker: ./test/commands/docker/run.sh +command-docs: + ./test/commands/docs/run.sh + +command-eval: + ./test/commands/eval/run.sh + command-exec: ./test/commands/exec/run.sh command-emacs: ./test/commands/emacs/run.sh +command-format: + ./test/commands/format/run.sh + +command-info: + ./test/commands/info/run.sh + +command-init: + ./test/commands/init/run.sh + command-install: ./test/commands/install/run.sh +command-link: + ./test/commands/link/run.sh + +command-lint: + ./test/commands/lint/run.sh + command-outdated-upgrade: ./test/commands/outdated_upgrade/run.sh +command-recipe: + ./test/commands/recipe/run.sh + +command-run: + ./test/commands/run/run.sh + command-search: ./test/commands/search/run.sh -command-link: - ./test/commands/link/run.sh +command-source: + ./test/commands/source/run.sh test-ert: ./test/commands/test/ert/run.sh diff --git a/test/commands/analyze/error/run.sh b/test/commands/analyze/error/run.sh new file mode 100755 index 00000000..4d0b5071 --- /dev/null +++ b/test/commands/analyze/error/run.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/analyze `analyze` errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +# Naviate to the test package +cd $(dirname "$0") + +echo "Testing analyze command... no files" +should_error eask analyze diff --git a/test/commands/bump/run.sh b/test/commands/bump/run.sh new file mode 100755 index 00000000..3b0dbf95 --- /dev/null +++ b/test/commands/bump/run.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/bump `bump` errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +# Naviate to the test package +cd $(dirname "$0") + +echo "Testing bump command... no files" +should_error eask bump diff --git a/test/commands/compile/run.sh b/test/commands/compile/run.sh new file mode 100755 index 00000000..4d5ade65 --- /dev/null +++ b/test/commands/compile/run.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/compile `compile` errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +cd $(dirname "$0") + +echo "Testing compile command... no files" +should_error eask compile diff --git a/test/commands/concat/run.sh b/test/commands/concat/run.sh new file mode 100755 index 00000000..a971d6c8 --- /dev/null +++ b/test/commands/concat/run.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/concat `concat` errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +# Naviate to the test package +cd $(dirname "$0") + +echo "Testing concat command... no files" +should_error eask concat diff --git a/test/commands/docs/run.sh b/test/commands/docs/run.sh new file mode 100755 index 00000000..a6d676f5 --- /dev/null +++ b/test/commands/docs/run.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/docs `docs` errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +# Naviate to the test package +cd $(dirname "$0") + +echo "Testing docs command... no files" +should_error eask docs diff --git a/test/commands/eval/run.sh b/test/commands/eval/run.sh new file mode 100755 index 00000000..33cf8875 --- /dev/null +++ b/test/commands/eval/run.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/eval `eval` errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +cd $(dirname "$0") + +echo "Testing eval command... no arg" +should_error eask eval diff --git a/test/commands/exec/run.sh b/test/commands/exec/run.sh old mode 100644 new mode 100755 index bf2ca4c4..472e1155 --- a/test/commands/exec/run.sh +++ b/test/commands/exec/run.sh @@ -22,6 +22,8 @@ set -e +source ./test/fixtures/home/scripts/testing.sh + echo "Test command 'exec'..." cd $(dirname "$0") @@ -32,3 +34,6 @@ eask exec echo hello world eask exec buttercup -L . eask exec buttercup -L . --pattern 'pattern 1' + +echo "Testing exec command... no files" +should_error eask exec diff --git a/test/commands/format/run.sh b/test/commands/format/run.sh new file mode 100755 index 00000000..33a9900c --- /dev/null +++ b/test/commands/format/run.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/format errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +cd $(dirname "$0") + +echo "Testing elfmt command... no files" +should_error eask format elfmt + +echo "Testing elisp-autofmt command... no files" +should_error eask format elisp-autofmt diff --git a/test/commands/info/run.sh b/test/commands/info/run.sh new file mode 100755 index 00000000..853dbbe1 --- /dev/null +++ b/test/commands/info/run.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/info errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +echo "Testing info command... no files" +should_error eask -g info +# When run in the current directory this sees the eask file from the main project diff --git a/test/commands/init/run.sh b/test/commands/init/run.sh new file mode 100755 index 00000000..3af99681 --- /dev/null +++ b/test/commands/init/run.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test eask init errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +cd $(dirname "$0") + +echo "Testing init --from cask command... no files" +should_error eask init --from cask + +echo "Testing init --from keg command... no files" +should_error eask init --from keg + +echo "Testing init --from eldev command... no files" +should_error eask init --from eldev + +echo "Testing init --from source command... no files" +should_error eask init --from source diff --git a/test/commands/install/run.sh b/test/commands/install/run.sh old mode 100644 new mode 100755 index 8f51e968..02bd31c2 --- a/test/commands/install/run.sh +++ b/test/commands/install/run.sh @@ -22,6 +22,8 @@ set -e +source ./test/fixtures/home/scripts/testing.sh + echo "Test commands related to install, and uninstall" # Naviate to the test package @@ -42,3 +44,14 @@ eask uninstall beacon transwin echo "Uninstall project package" eask uninstall + +echo "Test eask install ... no files" +cd - +cd $(dirname "$0") +should_error eask install + +echo "Test eask uninstall ... no files" +should_error eask uninstall + +echo "Test eask reinstall ... no files" +should_error eask reinstall diff --git a/test/commands/link/run.sh b/test/commands/link/run.sh old mode 100644 new mode 100755 index 6e154763..8b457087 --- a/test/commands/link/run.sh +++ b/test/commands/link/run.sh @@ -26,6 +26,15 @@ set -e +source ./test/fixtures/home/scripts/testing.sh + eask link add "mini.pkg.1" "./test/fixtures/mini.pkg.1/" eask link list eask link delete mini.pkg.1-0.0.1 + +cd $(dirname "$0") + +echo "Testing link command... no files" +should_error eask link add # not enough args +should_error eask link add foo . # missing package, prints help +should_error eask link delete diff --git a/test/commands/lint/run.sh b/test/commands/lint/run.sh new file mode 100755 index 00000000..4a414809 --- /dev/null +++ b/test/commands/lint/run.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/lint errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +# Naviate to the test package +cd $(dirname "$0") + +echo "Testing lint checkdoc command... no files" +should_error eask lint checkdoc + +echo "Testing lint declare command... no files" +should_error eask lint declare + +echo "Testing lint elint command... no files" +should_error eask lint elint + +echo "Testing lint elisp-lint command... no files" +should_error eask lint elisp-lint + +echo "Testing lint elsa command... no files" +should_error eask lint elsa + +echo "Testing lint indent command... no files" +should_error eask lint indent + +echo "Testing lint keywords command... no files" +should_error eask lint keywords + +echo "Testing lint regexps command... no files" +should_error eask lint regexps diff --git a/test/commands/recipe/run.sh b/test/commands/recipe/run.sh new file mode 100755 index 00000000..07854121 --- /dev/null +++ b/test/commands/recipe/run.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/recipe `recipe` errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +# Naviate to the test package +cd $(dirname "$0") + +echo "Testing recipe command... no files" +should_error eask recipe diff --git a/test/commands/run/run.sh b/test/commands/run/run.sh new file mode 100755 index 00000000..505f3231 --- /dev/null +++ b/test/commands/run/run.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/run errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +cd $(dirname "$0") + +echo "Testing 'run command' command... no files" +should_error eask run command + +echo "Testing 'run script' command... no files" +should_error eask run script -g # needs to avoid parent Eask file diff --git a/test/commands/search/run.sh b/test/commands/search/run.sh old mode 100644 new mode 100755 index 5c2ab488..a3962e59 --- a/test/commands/search/run.sh +++ b/test/commands/search/run.sh @@ -22,10 +22,12 @@ set -e +source ./test/fixtures/home/scripts/testing.sh + echo "Test command 'search'..." cd $(dirname "$0") -eask search +should_error eask search eask search company eask search company dash --depth 0 eask search company dash f s --depth 0 -g diff --git a/test/commands/source/run.sh b/test/commands/source/run.sh new file mode 100755 index 00000000..56650574 --- /dev/null +++ b/test/commands/source/run.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Copyright (C) 2022-2025 the Eask authors. + +# 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 this program. If not, see . + +## Commentary: +# +# Test command/source errors +# + +set -e + +source ./test/fixtures/home/scripts/testing.sh + +cd $(dirname "$0") + +echo "Testing source command... errors" +should_error eask source +should_error eask source add +should_error eask source add foo # name not found, show help + +should_error eask source delete +should_error eask source delete foo # name not found, show help diff --git a/test/commands/test/ert/run.sh b/test/commands/test/ert/run.sh index 60c3b1b0..1d829364 100755 --- a/test/commands/test/ert/run.sh +++ b/test/commands/test/ert/run.sh @@ -22,6 +22,8 @@ set -e +source ./test/fixtures/home/scripts/testing.sh + echo "Test command 'ert'..." cd $(dirname "$0") @@ -30,3 +32,6 @@ eask test ert ./test/*.el # regression echo "Test ert: nil message" eask test ert ./test-nil-message/*.el + +echo "Testing ert command... no files" +should_error eask test ert diff --git a/test/fixtures/home/scripts/testing.sh b/test/fixtures/home/scripts/testing.sh new file mode 100755 index 00000000..bccd8a95 --- /dev/null +++ b/test/fixtures/home/scripts/testing.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Test reporting functions +# This file will be sourced by other shell test scripts. +# Expects to run with set -e + +# TODO note that eask output is always to stderr + +# Run command and exit with the same status +# All args interpreted as program to run +# e.g. should_run cmd arg1 arg2 ... +should_run() { + echo "Run: $*" + echo "---------------" + "$@" 2>&1 | cat + local TEST_STATUS=${PIPESTATUS[0]} + + echo "" + + if [ $TEST_STATUS -gt 0 ]; then + printf "Fail: \'%s\' exited with status %s\n" "$*" "$TEST_STATUS" >&2 + exit 1 + fi +} + +# Run command and exit with non-zero if command exits with zero. +# All args interpreted as program to run +# e.g. should_error cmd arg1 arg2 ... +should_error() { + echo "Run: $*" + echo "---------------" + # a shorter alternative is + # ! "$@" || (echo "failed" && exit 1) + + # this version allow for more formatting + "$@" 2>&1 | cat # Exit status of individual commands in a pipeline are ignored + local TEST_STATUS=${PIPESTATUS[0]} # Get the true status, $? will always be 0 + + echo "" + + if [ $TEST_STATUS -eq 0 ]; then + printf "Fail: \'%s\' should exit with non-zero status\n" "$*" >&2 + exit 1 + fi +} + +# Check if (grep) pattern ARG1 is found in string ARG2 +# E.g. should_match "foo*" "foobar" +should_match() { + echo "$2" | grep "$1" - | cat > /dev/null + local SEARCH_RES=${PIPESTATUS[1]} + + if [ $SEARCH_RES -gt 0 ]; then + printf "Fail: Output did not match \'%s\'\n" "$1" + exit 1 + fi +} From 6109de65fd138826a99b65a6b6c7d1a6c847fc4a Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Tue, 18 Mar 2025 13:15:22 -0700 Subject: [PATCH 08/10] Add CI job to test exit status in help commands --- .github/workflows/help_exit.yml | 75 +++++++++++++++++++++++++++++++++ Makefile | 3 ++ 2 files changed, 78 insertions(+) create mode 100644 .github/workflows/help_exit.yml diff --git a/.github/workflows/help_exit.yml b/.github/workflows/help_exit.yml new file mode 100644 index 00000000..beb5abc4 --- /dev/null +++ b/.github/workflows/help_exit.yml @@ -0,0 +1,75 @@ +name: Help-Exit + +on: + push: + branches: + - master + paths: + - 'eask' + - '**.yml' + - lisp/** + - cmds/** + - src/** + - test/** + pull_request: + branches: + - master + paths-ignore: + - '**.md' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + emacs-version: + - 26.3 + - 27.2 + - 28.2 + - 29.4 + - 30.1 + experimental: [false] + include: + - os: ubuntu-latest + emacs-version: snapshot + experimental: true + - os: macos-latest + emacs-version: snapshot + experimental: true + - os: windows-latest + emacs-version: snapshot + experimental: true + exclude: + - os: macos-latest + emacs-version: 26.3 + - os: macos-latest + emacs-version: 27.2 + + steps: + - uses: jcs090218/setup-emacs@master + with: + version: ${{ matrix.emacs-version }} + + - uses: actions/checkout@v4 + + - name: Prepare Eask (Unix) + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + run: | + chmod -R 777 ./ + .github/scripts/setup-eask + + - name: Prepare Eask (Windows) + if: matrix.os == 'windows-latest' + run: .github/scripts/setup-eask.ps1 + + - name: Testing... + run: | + make command-help-exit diff --git a/Makefile b/Makefile index 099bdec8..fd4cb517 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,9 @@ command-config: command-local: ./test/commands/local/run.sh +# new tests which check missing args not covered by existing tests +command-help-exit: command-bump command-concat command-docs command-eval command-format command-info command-init command-lint command-recipe command-run command-source + command-analyze: ./test/commands/analyze/dsl/run.sh ./test/commands/analyze/metadata/run.sh From 3a0e379337405c2d79e3d3ad84b3a5c7d48a065e Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Tue, 18 Mar 2025 17:57:27 -0700 Subject: [PATCH 09/10] Only run Help-Exit job on emacs 30.1 --- .github/workflows/help_exit.yml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/.github/workflows/help_exit.yml b/.github/workflows/help_exit.yml index beb5abc4..830ae32b 100644 --- a/.github/workflows/help_exit.yml +++ b/.github/workflows/help_exit.yml @@ -25,38 +25,15 @@ concurrency: jobs: test: runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - emacs-version: - - 26.3 - - 27.2 - - 28.2 - - 29.4 - - 30.1 - experimental: [false] - include: - - os: ubuntu-latest - emacs-version: snapshot - experimental: true - - os: macos-latest - emacs-version: snapshot - experimental: true - - os: windows-latest - emacs-version: snapshot - experimental: true - exclude: - - os: macos-latest - emacs-version: 26.3 - - os: macos-latest - emacs-version: 27.2 steps: - uses: jcs090218/setup-emacs@master with: - version: ${{ matrix.emacs-version }} + version: 30.1 - uses: actions/checkout@v4 From 8f4d787a38a932b8a3370431f3b1c5a63400cc8e Mon Sep 17 00:00:00 2001 From: Josh Bax Date: Tue, 18 Mar 2025 18:13:22 -0700 Subject: [PATCH 10/10] Fix some CI errors --- test/fixtures/mini.pkg.1/Eask | 2 +- test/fixtures/mini.pkg.1/mini.pkg.1.el | 2 +- test/options/run.sh | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 test/options/run.sh diff --git a/test/fixtures/mini.pkg.1/Eask b/test/fixtures/mini.pkg.1/Eask index 4ed76b64..480eef12 100644 --- a/test/fixtures/mini.pkg.1/Eask +++ b/test/fixtures/mini.pkg.1/Eask @@ -3,7 +3,7 @@ "Minimal test package") (website-url "https://github.com/emacs-eask/cli/tree/master/test/fixtures/mini.pkg.1") -(keywords "test") +(keywords "test" "local") (package-file "mini.pkg.1.el") diff --git a/test/fixtures/mini.pkg.1/mini.pkg.1.el b/test/fixtures/mini.pkg.1/mini.pkg.1.el index 4818de2d..1db1a166 100644 --- a/test/fixtures/mini.pkg.1/mini.pkg.1.el +++ b/test/fixtures/mini.pkg.1/mini.pkg.1.el @@ -7,7 +7,7 @@ ;; URL: https://github.com/emacs-eask/cli/tree/master/test/fixtures/mini.pkg.1 ;; Version: 0.0.1 ;; Package-Requires: ((emacs "24.3") (s "1.12.0") (fringe-helper "1.0.1")) -;; Keywords: test +;; Keywords: test local ;; This file is NOT part of GNU Emacs. diff --git a/test/options/run.sh b/test/options/run.sh old mode 100644 new mode 100755 index a703e871..6eb8911e --- a/test/options/run.sh +++ b/test/options/run.sh @@ -22,12 +22,14 @@ set -e +source ./test/fixtures/home/scripts/testing.sh + echo "Test all options flag" cd $(dirname "$0") # Please have these flags in order, see `eask` file in the project root! -eask info -g -eask info --global +should_error eask info -g +should_error eask info --global eask info -a eask info --all eask info -q