Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • May 05 04:01
    vladdoster closed #124
  • May 05 04:01
    vladdoster edited #124
  • May 05 04:00
    vladdoster opened #124
  • Mar 20 19:15
    molovo closed #123
  • Mar 14 16:07
    paltherr opened #123
  • Sep 08 2021 15:55
    ryaminal opened #122
  • May 25 2021 19:22
    pawamoy closed #100
  • May 25 2021 19:22
    pawamoy closed #119
  • May 13 2021 14:59
    pawamoy commented #119
  • Jan 18 2021 20:58
    EduardoSimon opened #121
  • Sep 04 2020 20:30
    pawamoy synchronize #119
  • Jun 25 2020 07:45
    molovo closed #106
  • Jun 25 2020 07:45
    molovo closed #109
  • Jun 25 2020 07:42
    molovo commented #106
  • Jun 25 2020 07:39

    molovo on master

    Add zplug installation method t… (compare)

  • Jun 25 2020 07:39
    molovo closed #120
  • Jun 24 2020 18:48
    pawamoy commented #120
  • Jun 24 2020 18:45
    pawamoy commented #119
  • Apr 19 2020 10:33
    pawamoy edited #120
  • Apr 13 2020 15:00
    pawamoy opened #120
how can I unit test specific functions in my script?
James Dinsdale

You can use the load helper to source the file which contains the function and then you can call it with the run helper like a normal command. Or alternatively you can source all your functions inside a bootstrap script before testing begins

Be aware though, any code not inside a function will still execute when the file is sourced, so that will only work if you define your functions in a separate file from any executing code

Guillaume Massé
Hey how can I set up a zunit test for autocompletion ?
Sebastian Gniazdowski
@molovo What impression did zsd-transform have, is it OK or poor ?
I have a plugin that is invoked when the user presses a key sequence. I make use of the cursor (I get the word the cursor is on to be exact). Is there a good way to test this?
actually, i can encapsulate the functionality into it's own function (and test that), and leave out testing key inputs
Andreas Fuchs
I'd like to unit-test a set of ZLE plugins, and am wondering if anyone has made something that hooks it up to zunit yet
these are a set of editor commands, so I'd like to go from a given text in the editor, and cursor is at a given position, running a command to a new text and cursor position
not sure how to query zle for that, so I was hoping somebody had already made a function for that (:
Olivier Anguenot
I discovered zunit recently and use it for my projet. Is it possible to lauch tests from Jenkins ?
Sebastian Gniazdowski
Any chances for the PRs to be merged?
Sebastian Gniazdowski
@molovo: Any chances for the revolver PRs to be merged?
@antifuchs: it should be easier now with the new (undocumented yet) helper evl – basically an eval. However, you would also probably need to use zsh/zpty module
Eduardo Vazquez
Hi, just added a script to install zunit with antigen package manager, let me know if you're interested in a PR and i'll add/modify what's necessary to fit code/contribution style
Sebastian Gniazdowski
@LaloHao popd and pushd have -q option that'll resemble >/dev/null