From fcb071d7034e18de2647f1065b7f4faacfc58a2a Mon Sep 17 00:00:00 2001 From: Jen-Chieh Shen Date: Tue, 19 Sep 2023 18:40:25 -0700 Subject: [PATCH] feat(docker): Add docker command (#188) * feat(docker): Add docker command * Add docker test * Ignore test on windows * docs: * docs: Update changelog --- .github/workflows/docker.yml | 57 +++++++++++++++ CHANGELOG.md | 1 + Makefile | 3 + README.md | 5 +- cmds/core/docker.js | 73 +++++++++++++++++++ .../en/Getting-Started/Basic-Usage/_index.md | 71 +++++++++--------- .../Getting-Started/Commands-and-options.md | 68 +++++++++++------ .../Getting-Started/Basic-Usage/_index.md | 71 +++++++++--------- .../Getting-Started/Commands-and-options.md | 66 +++++++++++------ package-lock.json | 36 +++++++++ package.json | 1 + src/util.js | 30 ++++++++ test/commands/docker/run.sh | 30 ++++++++ 13 files changed, 392 insertions(+), 120 deletions(-) create mode 100644 .github/workflows/docker.yml create mode 100644 cmds/core/docker.js create mode 100644 test/commands/docker/run.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..67ebaa52 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,57 @@ +name: Docker + +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 }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + #- windows-latest # XXX: Docker is not supported on Windows! + emacs-version: + - 29.1 + + 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-docker diff --git a/CHANGELOG.md b/CHANGELOG.md index dec20cb3..313b5137 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how * Print archives progress (#184) * Respect package file path in `autoload` command (44c042445bba0dd071d9112e58549437b7ebd58d) * fix(vcpkg): Use workaround for `MODULE_NOT_FOUND` error (#187) +* Add docker command (#188) ## 0.8.x > Released Mar 08, 2023 diff --git a/Makefile b/Makefile index 541b8ac0..162a71d0 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,9 @@ command-check-eask: ./test/checker/dsl/run.sh ./test/checker/metadata/run.sh +command-docker: + ./test/commands/docker/run.sh + command-exec: ./test/commands/exec/run.sh diff --git a/README.md b/README.md index 796e9314..a913b9cc 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,9 @@ information.* | Test commands in development (`./`) mode | ✔ | [![Local](https://github.com/emacs-eask/cli/actions/workflows/local.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/local.yml) | | Test install packages | ✔ | [![Install](https://github.com/emacs-eask/cli/actions/workflows/install.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/install.yml) | | Test link packages | ✔ | [![Link](https://github.com/emacs-eask/cli/actions/workflows/link.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/link.yml) | -| Test execute commands | ✔ | [![Exec](https://github.com/emacs-eask/cli/actions/workflows/exec.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/exec.yml) | -| Test emacs commands | ✔ | [![Emacs](https://github.com/emacs-eask/cli/actions/workflows/emacs.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/emacs.yml) | +| Test `docker` command | ✔ | [![Docker](https://github.com/emacs-eask/cli/actions/workflows/docker.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/docker.yml) | +| Test `exec` command | ✔ | [![Exec](https://github.com/emacs-eask/cli/actions/workflows/exec.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/exec.yml) | +| Test `emacs` command | ✔ | [![Emacs](https://github.com/emacs-eask/cli/actions/workflows/emacs.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/emacs.yml) | | Test search packages | ✔ | [![Search](https://github.com/emacs-eask/cli/actions/workflows/search.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/search.yml) | | Test upgrade and check outdated packages | ✔ | [![Outdated_Upgrade](https://github.com/emacs-eask/cli/actions/workflows/outdated_upgrade.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/outdated_upgrade.yml) | | `Eask`-file checker | ✔ | [![Checker](https://github.com/emacs-eask/cli/actions/workflows/checker.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/checker.yml) | diff --git a/cmds/core/docker.js b/cmds/core/docker.js new file mode 100644 index 00000000..6b71adbd --- /dev/null +++ b/cmds/core/docker.js @@ -0,0 +1,73 @@ +/** + * Copyright (C) 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. + */ + +"use strict"; + +const path = require('path'); +const child_process = require("child_process"); + +exports.command = ['docker [args..]']; +exports.desc = 'Launch specified Emacs version in a Docker container'; +exports.builder = async (yargs) => { + yargs.help(false); + yargs.version(false); + yargs.getOptions().narg = []; + yargs.positional('', { + description: 'Emacs version to test', + type: 'string', + }); +}; + +exports.handler = async (argv) => { + if (!UTIL.which('docker')) { + console.log("Docker is not installed (cannot find `docker' executable)"); + return; + } + + let project_dir = convert_path(process.cwd()); + if (!project_dir.startsWith('/')) { + project_dir = '/' + project_dir; + } + let container_dir = '/' + path.basename(project_dir); + + let container_arg = project_dir + ':' + container_dir; + + let default_cmd = ['docker', 'run', '--rm', + '-v', container_arg, + '-w', container_dir, + 'silex/emacs:' + argv.version + '-ci-eask', + 'eask']; + let rest = process.argv.slice(4); + let cmd = default_cmd.concat(rest); + + let proc = child_process.spawn(UTIL.cli_args(cmd), { stdio: 'inherit', shell: true }); + + proc.on('close', function (code) { + if (code == 0) return; + process.exit(code); + }); +}; + +/** + * Convert path so docker can recognize! + * @param { String } path - Path to convert. + */ +function convert_path(path) { + return UTIL.slash(path).replaceAll(':', ''); +} diff --git a/docs/content/en/Getting-Started/Basic-Usage/_index.md b/docs/content/en/Getting-Started/Basic-Usage/_index.md index 91fae82c..a9d5e3e0 100644 --- a/docs/content/en/Getting-Started/Basic-Usage/_index.md +++ b/docs/content/en/Getting-Started/Basic-Usage/_index.md @@ -32,41 +32,42 @@ Eask is a command-line tool that helps you build, lint, and test Emacs Lisp pack Usage: eask [options..] Commands: - archives List out all package archives [aliases: sources] - clean Delete various files produced during building - compile [names..] Byte compile all Emacs Lisp files in the package - create Create a new elisp project - emacs [args..] Execute emacs with the appropriate environment - eval [form] Evaluate lisp form with a proper PATH - path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] - exec [args..] Execute command with correct environment PATH set up - files [patterns..] Print all package files - generate Generate files that are used for the development - info Display information about the current package - init [files..] Initialize project to use Eask - install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] - install [names..] Install packages - keywords List available keywords that can be used in the header section - link Manage links - lint Run linter - list List packages - load-path [patterns..] Print the load-path from workspace - load [files..] Load elisp files - outdated Show all outdated dependencies - package-directory Print path to package directory - package [destination] Build a package artifact, and put it into the given destination - recipe Suggest a recipe format - refresh Download package archives - reinstall [names..] Reinstall packages - run [names..] Run the script named [names..] [aliases: run-script] - search [queries..] Search packages - status Display the state of the workspace - test Run test - uninstall [names..] Uninstall packages [aliases: delete] - upgrade [names..] Upgrade packages - check-eask [files..] Run eask checker - locate Print out Eask installed location - upgrade-eask Upgrade Eask itself [aliases: upgrade-self] + archives List out all package archives [aliases: sources] + clean Delete various files produced during building + compile [names..] Byte compile all Emacs Lisp files in the package + create Create a new elisp project + docker [args..] Launch specified Emacs version in a Docker container + emacs [args..] Execute emacs with the appropriate environment + eval [form] Evaluate lisp form with a proper PATH + path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] + exec [args..] Execute command with correct environment PATH set up + files [patterns..] Print all package files + generate Generate files that are used for the development + info Display information about the current package + init [files..] Initialize project to use Eask + install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] + install [names..] Install packages + keywords List available keywords that can be used in the header section + link Manage links + lint Run linter + list List packages + load-path [patterns..] Print the load-path from workspace + load [files..] Load elisp files + outdated Show all outdated dependencies + package-directory Print path to package directory + package [destination] Build a package artifact, and put it into the given destination + recipe Suggest a recipe format + refresh Download package archives + reinstall [names..] Reinstall packages + run [names..] Run the script named [names..] [aliases: run-script] + search [queries..] Search packages + status Display the state of the workspace + test Run test + uninstall [names..] Uninstall packages [aliases: delete] + upgrade [names..] Upgrade packages + check-eask [files..] Run eask checker + locate Print out Eask installed location + upgrade-eask Upgrade Eask itself [aliases: upgrade-self] Proxy Options: --proxy update proxy for HTTP and HTTPS to host [string] diff --git a/docs/content/en/Getting-Started/Commands-and-options.md b/docs/content/en/Getting-Started/Commands-and-options.md index 9da9f224..22fb9793 100644 --- a/docs/content/en/Getting-Started/Commands-and-options.md +++ b/docs/content/en/Getting-Started/Commands-and-options.md @@ -233,30 +233,6 @@ $ eask [GLOBAL-OPTIONS] files [PATTERNS..] If `[PATTERNS..]` are defined, it will display files that match that pattern. -## 🔍 eask exec - -Execute the system command with the given arguments. - -```sh -$ eask [GLOBAL-OPTIONS] exec [COMMAND] [ARGUMENTS ...] -``` - -## 🔍 eask emacs - -Execute emacs with the appropriate environment. - -```sh -$ eask [GLOBAL-OPTIONS] emacs [ARGUMENTS ...] -``` - -## 🔍 eask eval - -Evaluate `FORM` as a lisp form. - -```sh -$ eask [GLOBAL-OPTIONS] eval [FORM] -``` - ## 🔍 eask load Load Emacs Lisp files in order. @@ -314,6 +290,50 @@ $ eask [GLOBAL-OPTIONS] run [FILES..] Alias: `run-script` +# 🚩 Execution + + +## 🔍 eask exec + +Execute the system command with the given arguments. + +```sh +$ eask [GLOBAL-OPTIONS] exec [COMMAND] [ARGUMENTS ...] +``` + +## 🔍 eask emacs + +Execute emacs with the appropriate environment. + +```sh +$ eask [GLOBAL-OPTIONS] emacs [ARGUMENTS ...] +``` + +## 🔍 eask eval + +Evaluate `FORM` as a lisp form. + +```sh +$ eask [GLOBAL-OPTIONS] eval [FORM] +``` + +## 🔍 eask docker + +Launch specified Emacs version in a Docker container. + +```sh +$ eask [GLOBAL-OPTIONS] docker [ARGUMENTS ...] +``` + +For example: + +```sh +$ eask docker 26.1 info +``` + +This is the same as jumping right into Emacs 26.1 (in docker) and executing +`eask info`. + # 🚩 Management ## 🔍 eask archives diff --git a/docs/content/zh-TW/Getting-Started/Basic-Usage/_index.md b/docs/content/zh-TW/Getting-Started/Basic-Usage/_index.md index 8235b2c5..284a5d97 100644 --- a/docs/content/zh-TW/Getting-Started/Basic-Usage/_index.md +++ b/docs/content/zh-TW/Getting-Started/Basic-Usage/_index.md @@ -29,41 +29,42 @@ Eask is a command-line tool that helps you build, lint, and test Emacs Lisp pack Usage: eask [options..] Commands: - archives List out all package archives [aliases: sources] - clean Delete various files produced during building - compile [names..] Byte compile all Emacs Lisp files in the package - create Create a new elisp project - emacs [args..] Execute emacs with the appropriate environment - eval [form] Evaluate lisp form with a proper PATH - path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] - exec [args..] Execute command with correct environment PATH set up - files [patterns..] Print all package files - generate Generate files that are used for the development - info Display information about the current package - init [files..] Initialize project to use Eask - install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] - install [names..] Install packages - keywords List available keywords that can be used in the header section - link Manage links - lint Run linter - list List packages - load-path [patterns..] Print the load-path from workspace - load [files..] Load elisp files - outdated Show all outdated dependencies - package-directory Print path to package directory - package [destination] Build a package artifact, and put it into the given destination - recipe Suggest a recipe format - refresh Download package archives - reinstall [names..] Reinstall packages - run [names..] Run the script named [names..] [aliases: run-script] - search [queries..] Search packages - status Display the state of the workspace - test Run test - uninstall [names..] Uninstall packages [aliases: delete] - upgrade [names..] Upgrade packages - check-eask [files..] Run eask checker - locate Print out Eask installed location - upgrade-eask Upgrade Eask itself [aliases: upgrade-self] + archives List out all package archives [aliases: sources] + clean Delete various files produced during building + compile [names..] Byte compile all Emacs Lisp files in the package + create Create a new elisp project + docker [args..] Launch specified Emacs version in a Docker container + emacs [args..] Execute emacs with the appropriate environment + eval [form] Evaluate lisp form with a proper PATH + path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] + exec [args..] Execute command with correct environment PATH set up + files [patterns..] Print all package files + generate Generate files that are used for the development + info Display information about the current package + init [files..] Initialize project to use Eask + install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] + install [names..] Install packages + keywords List available keywords that can be used in the header section + link Manage links + lint Run linter + list List packages + load-path [patterns..] Print the load-path from workspace + load [files..] Load elisp files + outdated Show all outdated dependencies + package-directory Print path to package directory + package [destination] Build a package artifact, and put it into the given destination + recipe Suggest a recipe format + refresh Download package archives + reinstall [names..] Reinstall packages + run [names..] Run the script named [names..] [aliases: run-script] + search [queries..] Search packages + status Display the state of the workspace + test Run test + uninstall [names..] Uninstall packages [aliases: delete] + upgrade [names..] Upgrade packages + check-eask [files..] Run eask checker + locate Print out Eask installed location + upgrade-eask Upgrade Eask itself [aliases: upgrade-self] Proxy Options: --proxy update proxy for HTTP and HTTPS to host [string] diff --git a/docs/content/zh-TW/Getting-Started/Commands-and-options.md b/docs/content/zh-TW/Getting-Started/Commands-and-options.md index cc192cb8..962bc495 100644 --- a/docs/content/zh-TW/Getting-Started/Commands-and-options.md +++ b/docs/content/zh-TW/Getting-Started/Commands-and-options.md @@ -230,30 +230,6 @@ $ eask [GLOBAL-OPTIONS] files [PATTERNS..] 如果定義了 `[PATTERNS..]` ,它將顯示與該模式匹配的文件。 -## 🔍 eask exec - -使用給定的參數執行系統命令。 - -```sh -$ eask [GLOBAL-OPTIONS] exec [COMMAND] [ARGUMENTS ...] -``` - -## 🔍 eask emacs - -在合適的環境下執行emacs。 - -```sh -$ eask [GLOBAL-OPTIONS] emacs [ARGUMENTS ...] -``` - -## 🔍 eask eval - -將 `FORM` 評估為 lisp 形式。 - -```sh -$ eask [GLOBAL-OPTIONS] eval [FORM] -``` - ## 🔍 eask load 按順序加載 Emacs Lisp 文件。 @@ -310,6 +286,48 @@ $ eask [GLOBAL-OPTIONS] run [FILES..] 別名: `run-script` +# 🚩 執行 + +## 🔍 eask exec + +使用給定的參數執行系統命令。 + +```sh +$ eask [GLOBAL-OPTIONS] exec [COMMAND] [ARGUMENTS ...] +``` + +## 🔍 eask emacs + +在合適的環境下執行emacs。 + +```sh +$ eask [GLOBAL-OPTIONS] emacs [ARGUMENTS ...] +``` + +## 🔍 eask eval + +將 `FORM` 評估為 lisp 形式。 + +```sh +$ eask [GLOBAL-OPTIONS] eval [FORM] +``` + +## 🔍 eask docker + +在 Docker 容器中啟動指定的 Emacs 版本 + +```sh +$ eask [GLOBAL-OPTIONS] docker [ARGUMENTS ...] +``` + +例如: + +```sh +$ eask docker 26.1 info +``` + +這與直接跳入 Emacs 26.1(在 docker 中)並執行 `eask info` 相同。 + # 🚩 管理 ## 🔍 eask archives diff --git a/package-lock.json b/package-lock.json index 273932ba..45495d97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.8.3", "license": "GPL-3.0", "dependencies": { + "which": "^4.0.0", "yargs": "^17.0.0" }, "bin": { @@ -92,6 +93,14 @@ "node": ">=8" } }, + "node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "engines": { + "node": ">=16" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -124,6 +133,20 @@ "node": ">=8" } }, + "node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -231,6 +254,11 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==" + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -254,6 +282,14 @@ "ansi-regex": "^5.0.1" } }, + "which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "requires": { + "isexe": "^3.1.1" + } + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 805303c0..85578be2 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "author": "Jen-Chieh Shen", "license": "GPL-3.0", "dependencies": { + "which": "^4.0.0", "yargs": "^17.0.0" }, "files": [ diff --git a/src/util.js b/src/util.js index ab056ff8..3908113b 100644 --- a/src/util.js +++ b/src/util.js @@ -22,6 +22,27 @@ const path = require('path'); const child_process = require("child_process"); +/** + * Check to see if a program is installed and exists on the path. + * @param { String } command - Program name. + * @return Return path or null if not found. + */ +function which(command) { + return require('which').sync(command, { nothrow: true }); +} + +/** + * Convert Windows backslash paths to slash paths: `foo\\bar` -> `foo/bar` + * @see https://github.com/sindresorhus/slash + */ +function slash(path) { + const isExtendedLengthPath = path.startsWith('\\\\?\\'); + if (isExtendedLengthPath) { + return path; + } + return path.replace(/\\/g, '/'); +} + /** * Return string escaped double quotes. * @param { String } str - String to escape string. @@ -33,6 +54,7 @@ function escape_str(str) { /** * Form CLI arguments into a single string. + * @see https://github.com/emacs-eask/cli/issues/128 * @param { Array } argv - Argument vector. */ function cli_args(argv) { @@ -175,6 +197,11 @@ function _environment_name (argv) { * @param { string } args - the rest of the arguments */ async function e_call(argv, script, ...args) { + if (!which(EASK_EMACS)) { + console.log("Emacs is not installed (cannot find `" + EASK_EMACS + "' executable)"); + return; + } + return new Promise(resolve => { let _path = el_script(script); @@ -233,6 +260,9 @@ function cmd_count() { /* * Module Exports */ +module.exports.which = which; +module.exports.slash = slash; + module.exports.escape_str = escape_str; module.exports.cli_args = cli_args; module.exports.plugin_dir = plugin_dir; diff --git a/test/commands/docker/run.sh b/test/commands/docker/run.sh new file mode 100644 index 00000000..dc9115e3 --- /dev/null +++ b/test/commands/docker/run.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Copyright (C) 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: +# +# Test command `docker` +# + +set -e + +# Naviate to the test package +cd "./test/fixtures/mini.emacs.pkg.1/" + +eask docker 26.1 info