MikeTaylor / scottkit

Scott Adams adventure toolkit: compile, decompile and play 80s-style adventure games
30 stars 10 forks source link

Automatic way to regenerate test expectations #14

Closed MikeTaylor closed 6 years ago

MikeTaylor commented 6 years ago

Some of the tests are really high-level: they are suitable for checking that nothing's been accidentally changed when performing code-surgery such as your present work on the play loop, but not so helpful when you actually want to change things. That's why the rebuild targets are so important.

There are a few Makefiles spread across the project that include rebuild targets. Perhaps the polite thing in the Ruby world would be to convert them all to Rake, but I'm not sure what it would really get us. Perhaps the big win for the small spend would be a rebuild target in the top-level Rakefile that runs Make in all the places where the test-suite expects to find up-to-date output to compare with.

(Come to think of it, rake regenerate would be better than rake rebuild.)

MikeTaylor commented 6 years ago

This was forked off from issue #12.

MikeTaylor commented 6 years ago

Actually, this is really easy. All you need to do is run make rebuild in two directories:

I should just make a top-level target that does that.

MikeTaylor commented 6 years ago

That was pleasantly straightforward.