Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 22 18:13
    psprint closed #111
  • Nov 22 18:13
    psprint commented #111
  • Nov 22 17:26
    psprint commented #111
  • Nov 22 17:26
    psprint commented #111
  • Nov 20 20:21
    psprint commented #111
  • Nov 20 20:14
    psprint synchronize #111
  • Nov 18 17:41
    psprint opened #111
  • Oct 22 11:56
    psprint closed #110
  • Oct 22 11:55
    psprint commented #110
  • Oct 22 11:49
    molovo commented #110
  • Oct 22 11:48
    molovo commented #110
  • Oct 22 11:45
    psprint commented #110
  • Oct 22 10:38
    molovo commented #110
  • Oct 19 14:09
    psprint opened #110
  • Sep 09 14:26
    psprint commented #109
  • Sep 09 13:44
    molovo commented #109
  • Sep 09 13:42
    psprint commented #109
  • Sep 09 07:58
    molovo commented #109
  • Sep 06 17:00
    psprint edited #109
  • Sep 06 16:59
    psprint edited #109
nkgm
@nkgm
how can I unit test specific functions in my script?
James Dinsdale
@molovo

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é
@MasseGuillaume
Hey how can I set up a zunit test for autocompletion ?
Sebastian Gniazdowski
@psprint
@molovo What impression did zsd-transform have, is it OK or poor ?
trungng92
@trungng92
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?
trungng92
@trungng92
actually, i can encapsulate the functionality into it's own function (and test that), and leave out testing key inputs
Andreas Fuchs
@antifuchs
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
@oanguenot
I discovered zunit recently and use it for my projet. Is it possible to lauch tests from Jenkins ?
Sebastian Gniazdowski
@psprint
Any chances for the PRs to be merged?
Sebastian Gniazdowski
@psprint
@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