Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update gh-r unit tests #380

Merged
merged 9 commits into from
Oct 30, 2022
Merged

fix: update gh-r unit tests #380

merged 9 commits into from
Oct 30, 2022

Conversation

vladdoster
Copy link
Member

Signed-off-by: Vladislav Doster [email protected]

@vladdoster
Copy link
Member Author

vladdoster commented Oct 30, 2022

Fixes issue

Zunit parsing would sometimes leak the Vim fold descriptions. AFAIK it did not affect test correctness but looked bad.

An example is shown below

Before

Screenshot 2022-10-30 at 01 05 59

✔ fd' { # A simple, fast and user-friendly alternative to

After

Screenshot 2022-10-30 at 01 04 48

✔ fd

@vladdoster vladdoster force-pushed the fix/unit-tests branch 2 times, most recently from ff59ea0 to 2ad0bb4 Compare October 30, 2022 10:32
@@ -1451,6 +1451,34 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {

return $?
} # ]]]

# FUNCTION: .zinit-single-line [[[
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows this code to be compiled and removes file containing only one function.

@@ -2359,7 +2384,7 @@ for its found {file}meson.build{pre} input file}:-because {flag}m{pre} \
∞zinit-make-hook() {
∞zinit-make-base-hook "$@" ""
} # ]]]
# FUNCTION: ∞zinit-make-hook [[[
# FUNCTION: ∞zinit-make-base-hook [[[
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a typo creating a duplicate of a different function causing docs to be incorrect.

Comment on lines +1317 to +1251
1. call the zsh plugin's standard *_plugin_unload function
2. call the code provided by the zsh plugin's standard @zsh-plugin-run-at-update
3. delete bindkeys (...)
4. delete zstyles
5. restore options
6. remove aliases
7. restore zle state
8. unfunction functions (created by plugin)
9. clean-up fpath and path
10. delete created variables
11. forget the plugin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix numbering

@@ -1383,7 +1367,7 @@ Called by:

____

FUNCTION: .zinit-update-in-parallel [[[
FUNCTION: .zinit-update-all-parallel [[[
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes incorrect name

@@ -815,7 +883,7 @@ Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

____

FUNCTION: ∞zinit-reset-opt-hook [[[
FUNCTION: ∞zinit-reset-hook [[[
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes incorrect name

@@ -198,7 +239,7 @@ Called by:

____

FUNCTION: -zinit_scheduler_add_sh. [[[
FUNCTION: -zinit_scheduler_add_sh [[[
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes . at end

docker build --tag=ghcr.io/zdharma-continuum/zinit:latest --file=docker/Dockerfile .

doc: clean
cd doc; zsh -l -d -f -i -c "zsd -v --scomm --cignore '(\#*FUNCTION:[[:space:]][\:\∞\.\+\@\-a-zA-Z0-9]*[\[]*|}[[:space:]]\#[[:space:]][\]]*)' $(DOC_SRC)"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctly filters out verbiage from docs

FUNCTION: .zinit-compute-ice [[[

@@ -1451,6 +1454,32 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {

return $?
} # ]]]
# FUNCTION: .zinit-single-line [[[
# Display cURL progress bar on a single line
.zinit-single-line() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@psprint Does this seem reasonable? I am moving this code from its own file (i.e., share/single-line.zsh) into a function with the rest of the Zinit code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, if it works then I guess it's fine.

Signed-off-by: Vladislav Doster <[email protected]>
- Add 'container' target to build local docker image
- Add 'zinit-additional' to be included in zcompile & doc generation
- Build local zinit image before `doc/container`
- Sort targets alphabetically

Signed-off-by: Vladislav Doster <[email protected]>
Documentation now includes code in `zinit-additional.zsh`

Signed-off-by: Vladislav Doster <[email protected]>
Move code in `share/single-line.zsh` into function within
`zinit-install.zsh`.

Additionally, allows for code to be compiled.

Signed-off-by: Vladislav Doster <[email protected]>
Temporarily disable container and installer workflows so CI checks pass.

Fixes for both are a WIP and will be in a seperate PR that also
re-enables the workflows.

Signed-off-by: Vladislav Doster <[email protected]>
- Fix function typos in asciidoc comments
- Fix asciidoc fold markers
- Fix function args typos/style in asciidoc comments

Signed-off-by: Vladislav Doster <[email protected]>
Signed-off-by: Vladislav Doster <[email protected]>
@vladdoster vladdoster merged commit fad444b into main Oct 30, 2022
@vladdoster vladdoster deleted the fix/unit-tests branch October 30, 2022 15:00
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

🎉 This PR is included in version 3.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants