PuzzleScriptPlus
PuzzleScriptPlus copied to clipboard
Clean up test cases
Some tests fail on capitalization changes & "The Far Away Danish Pastry..." test also fails for some unknown reason (probably it doesn't handle the comment just before a level incorrectly). Need to clean it up so all tests pass.
Also adding some PS+ tests might be nice to test output for prelude flags & case_sensitive...
Add all of my own games?
Now only the Danish Pastry test fails, it seems like it is unable to load level 7 because of a comment directly in-between level 6 and 7. Need to double check at which commit this behaviour broke, then consider a fix.
Can't reproduce on the Dario Zubovic fork, or on live
branch or c9de4f5 - Moves smoothcamera code from graphics to engine so tests will run
here.
Danish Pastry level 7 no longer works after this commit: 503c83e - Added GOTO commands.
All tests now pass. I've added a PuzzleScript Plus-specific test suite with 23 tests (from my own games, the examples, and one game with an open source license). Should make an open call for adding more tests. There are still some weird issues with the Ctrl+J test generation on this fork, and I'm not yet sure why.
I don't see a fix for Danish Pastry in any recent checkin. Is it fixed? And the others?
Danish Pastry was bugfixed with https://github.com/Auroriax/PuzzleScriptPlus/commit/08c345df503901ece0b2a5d7a9a7469f002b9a09 . For the other tests I've changed their capitalization in the test data in https://github.com/Auroriax/PuzzleScriptPlus/commit/a9be0506d90ffa8ad087814a4081084f685c4e35. Now all tests should run.
Still actionable for this issue:
- Ask PS+ developers to allow adding their code to the unit tests
- Write unit tests for all new PS+ error messages and functionality. (Not sure to which degree this is possible, but simply checking for compilation errors/warnings should be possible for most features).
I'm not sure then I can get to the second point but I'll try to do so soon-ish.
I found and fixed Danish Pastry in my merge version. Capitalisation is a work in progress, and will probably turn up more bugs when we get more and better PS+ tests. Any PS+ tests you can find are very much worth it. My plan is to do your (2): fill in the gaps so there is a test for everything, even if it's just compile and burn. But it'll take me time to get there.
The merge PR I submitted resolves this issue. It can be closed.