Add a few basic tests for the compiled executable - #10
Conversation
ed618fa to
35c93b8
Compare
35c93b8 to
2b8425c
Compare
pyrmont
left a comment
There was a problem hiding this comment.
Thank you so much for going to the effort of making the test file (and using things like Testament!). I'm sorry it took so long for me to review.
I did refactor it a bit so that it would work without the user needing to have built the executable in advance. Let me know if it looks all right from your side!
|
This looks great and I like your changes to build the executable automatically. There are two remaining concerns or questions that I have:
For the first item, prior to this the executable could be built and testing could be completed with only janet as a dependency. From a packaging perspective I would need to create a package for jeep, and make that a build dependency for predoc. If that's the intent I can do that, but there is a certain appeal to having minimal dependencies. IMHO it would be great from a packaging perspective if predoc could continue to be built and tested with only janet as a dependency, while also having the codebase structured to work well with developers who choose to use jeep. My assumption is that this could be done fairly easily by changing one line as mentioned above? The second item is starting to get into semantics, but ideally from a packaging perspective the executable that is installed should be the same one that is tested in If you agree with one or both of these I can work on making the changes. I wanted to check with you first though before working on anything. Thanks! |
I confess my brain broke and I completely forgot that I had all the files in
I’ve followed your suggestion and now check whether the binary is in the bundle root. If it is, the code copies the file into Apologies for forgetting how my own project works! :D |
|
Looks great! Thank you very much. By the way, could you create a new release after this merges? |
|
Thanks for taking the time to write the tests! It’s great to have this as part of the suite now :) |
Done! |
Rather than creating a shell script to test the executable I added some test cases using the existing testament test runner in the test folder. The tests fail if the user does not first compile/build the predoc executable. I wasn't sure if there was an easy way to add a dependency similar to a Makefile that would compile predoc if it didn't exist when running the test system.