Simple Unit Tests extension

Do you wish you could easily run some unit tests? Now you can!

Download from Github Or the Inform 7 Extensions Website

It’s as simple as adding tests like these:

Unit test: assert 5 is 5; assert {1, 2, 3} is {1, 2, 3}; assert "happy" is "happy"; say "hello!"; assert the captured output is "hello!"; assert the player is enclosed by the location;

Requires Text Capture by Eric Eve.

Oh cool. I don’t get how people get by without unit testing. I rolled my own very crude extension but I’ll check this out instead. Excellent.

I have updated this extension and submitted it to the Inform 7 extensions site.

Changes:

  1. You can now assert any condition
  2. After running the unit tests it quietly runs “undo”, so that tests cannot permanently change anything.

Thanks for this - it looks cool!

(I’ve been away for a while, so this is a bit of a catching-up bump for me)