Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Feb 01 10:06
    chitoku-k review_requested #117
  • Feb 01 10:05
    chitoku-k review_requested #117
  • Feb 01 10:03
    chitoku-k opened #117
  • Jan 19 11:47
    hexium310 opened #116
  • Jan 04 08:00
    NReilingh edited #114
  • Jan 04 07:48
    NReilingh opened #115
  • Jan 04 05:07
    NReilingh opened #114
  • Dec 27 2019 15:09
    NReilingh opened #113
  • Dec 17 2019 15:14
    psprint commented #112
  • Dec 17 2019 11:52
    molovo commented #112
  • Dec 17 2019 11:38
    psprint commented #112
  • Dec 17 2019 11:37

    psprint on master

    helpers.zsh: Fix quoting issues… (compare)

  • Dec 17 2019 11:37
    psprint closed #112
  • Dec 08 2019 11:30
    psprint opened #112
  • Nov 22 2019 18:13
    psprint closed #111
  • Nov 22 2019 18:13
    psprint commented #111
  • Nov 22 2019 17:26
    psprint commented #111
  • Nov 22 2019 17:26
    psprint commented #111
  • Nov 20 2019 20:21
    psprint commented #111
  • Nov 20 2019 20:14
    psprint synchronize #111
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