crinklywrappr / rivendell

general purpose library that pushes elvish to its limits!
BSD 2-Clause "Simplified" License
20 stars 4 forks source link

test module is too cryptic #7

Open tesujimath opened 6 days ago

tesujimath commented 6 days ago

I wanted to use test.elv for testing my bash-env-elvish package, but honestly I had to give up, just not understanding how to use it.

The docs read like notes to someone who already understands it, rather than something useful for someone trying to get started.

I have enjoyed other aspects of Rivendell, so thanks for making this, but I had to give up with test.elv for now, sorry.

crinklywrappr commented 4 days ago

@tesujimath Thanks for your feedback. I agree that the test.elv docs are difficult to grok. If all you want to do is use it in your own projects, the best place to start is probably to look at a test as an example e.g. https://github.com/crinklywrappr/rivendell/blob/master/algo.org#tests

t:test $tests | t:err (all)

Actually, I've been hoping to find someone interested in using this besides myself. If you're able to get a handle on it, I would love to add a Getting Started section to the docs. Or link to a blogpost on the README from someone who used it in anger.

crinklywrappr commented 4 days ago

@tesujimath Also, if you can describe how you want to use it, perhaps I can help with specifics.

tesujimath commented 4 days ago

@crinklywrappr Thanks for your reply.

I ended up writing my own TAP testing library elvish-tap, which is all about generating test output in TAP format, able to be consumed by any TAP consumer. There's a basic TAP consumer included. It's quite simple really.

My assertions are very basic, and I have nothing like your fixture and store, which seem rather more sophisticated, and I have no intention of replicating.

I wonder if these two testing libraries could fit together somehow? I didn't get to the stage of understanding the bulk of what your library is doing, but it seems quite different from mine. If you have the inclination to look at what I did I would welcome any comments you may have. :smile:

Anyway, what I created is fit for my own purpose as it is, and I do not intend to hack further on it at this stage.