Commit graph

15 commits

Author SHA1 Message Date
Vladislav Doster d618467ff0 fix: failing zunit tests & bootstrap script
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
2023-01-05 04:36:25 -06:00
Jan Katins c3d1bb586c
fix: allow zinit to be run from non-interactive scripts (#227)
* maint: Ignore .idea folder

Co-authored-by: Philipp Schmitt <pschmitt@users.noreply.github.com>

* fix: Don't escape exclamation marks in hook keys

Exclamation marks (per default) get escaped in interactive mode,
but not in non-interactive modes. In this case it meant that zinit
would not find any hooks which implements the ices when running in
non-interactive mode (e.g. in a script). This in turn would NOT result
in errors but would just silently not execute any of the ices which
of course would be a bad thing(tm).

https://github.com/zdharma-continuum/zinit/issues/199 has the details...

Closes: #199

* fix: Ignore errors if cp cannot copy .zwc files

This would otherwise bubble up as a hook failure and further up as a zinit call failure

* fix: Add pick ice now that the compile hook is run

After the fix, the compile hook is now run and would fail without this information. IN addition, only files starting with _ are linked into the completion folder.

* fix: Fix docker-buildx gh-r test now that atclone ice is run

* maint: Add basic tests for cp/mv/atclone/make ices

zunit runs tests non-interactively and these tests fail without the fix in this branch.

Co-authored-by: Philipp Schmitt <pschmitt@users.noreply.github.com>
2022-08-06 02:35:58 -04:00
vladislav doster d59f15067e refactor: zunit tests & gh-r logic (#201)
- Ability to run unit tests without Docker
- Define a Z-unit \_support/bootstrap script defining the isolated test
  environment in a temp dir via `mktemp -d`, to ensure a clean test
  environment.
- GH actions workflow now tests macOS & Windows and bumps Ubuntu to the
  latest.
- GH actions workflow leverages Homebrew to simplify installing zsh &
  zunit
- Condense Z-unit GH workflow into more organized build matrix. It
  avoids creating a new environment per test file as some test files
  only have one or two tests.
- Change or remove logic in the `setup` and `teardown` functions to
  commands which apply to type of tests being run (e.g., `gh-r` setup
  sets defualt ice `gh-r` and `nocompile`).
- Expand tests for testing `gh-r` on Linux & macOS for ensuring correct
  release selection.
- Correct GH workflow `on` conditions to avoid duplicating jobs.
- Update `gh-r` ice logic to be smarter about selecting a release for
  the current system.
- Expand linting to include the tools `shfmt`, `shellcheck`, and
  `mdformat`
- Rudimentary testing for all Zinit annexes (e.g., install with no
  errors)

|   Test   | Before | Now |
| :------: | :----: | :-: |
| annexes  |   3    | 10  |
|   gh-r   |   3    | 95  |
| plugins  |   2    |  3  |
| snippets |   4    |  4  |

<img width="841" alt="Screen Shot 2022-04-23 at 21 57 08" src="https://user-images.githubusercontent.com/10052309/164954220-123a8dc5-0399-41e3-b9cf-98b2cf599145.png">

Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
2022-04-24 05:24:10 -05:00
Philipp Schmitt bf61d59754
Ignore zshelldoc data 2021-11-20 00:11:46 +01:00
Sebastian Gniazdowski f6c2a4d3da Recompile request for the module 2020-01-18 12:51:08 +01:00
Sebastian Gniazdowski 2c246846fd .gitignore: Update 2019-08-07 12:18:29 +02:00
Sebastian Gniazdowski 9a754aa85c test: Test 10 to output relative REPO_DIR fragment instead of PATH 2017-11-26 03:45:28 +01:00
Sebastian Gniazdowski d68f59b964 test: New test plugin zsh-select-more for upcoming test 5 2017-11-19 11:26:06 +01:00
Sebastian Gniazdowski 64be10fa6c test: Update test 3 (ice-order test) to check also make ice-mod 2017-11-19 08:20:28 +01:00
Sebastian Gniazdowski f6b073108e test: Missing objects in the embedded test_plugin (repository) 2017-11-17 14:41:56 +01:00
Sebastian Gniazdowski 2355e2b1a0 test,Travis: Made test-suite working, attached to Travis CI 2017-11-17 13:44:25 +01:00
Sebastian Gniazdowski b6a4d1c5c1 test: First stage of adding test suite, required is a prepare script 2017-11-17 13:04:32 +01:00
Sebastian Gniazdowski 73e2b71a7b Update .gitignore 2017-10-18 13:38:42 +02:00
Sebastian Gniazdowski ffc27a3de4 Makefile with doc target, for Zshelldoc documentation 2017-09-23 08:50:04 +02:00
Sebastian Gniazdowski ef89fddd3e .gitignore 2017-06-18 09:03:14 +02:00