EngineOfDarkness / Stalker-Anomaly-Ltx-Loader

A Lua Script based Solution to change Vanilla Stalker Anomaly LTX Files
GNU General Public License v3.0
4 stars 0 forks source link

Use LuaUnit for Testing #4

Open EngineOfDarkness opened 3 years ago

EngineOfDarkness commented 3 years ago

See https://github.com/bluebird75/luaunit

Because testing manually takes too much time and is error prone.

EngineOfDarkness commented 3 years ago

Played around with it a bit, apart from me having dir problems (windows without lua install - simply used the notepad++ lua plugin) it seems to work.

However from other langs I miss mocks - having this would make mocking Stalker specific functions (e.g. getFS) a bit easier rather than me fiddling about with making "mocks" myself (yeah I can technically just define a table with that name and do some other stuff)

Perhaps I'll try https://github.com/Olivine-Labs/busted instead - not sure yet because there is some Issue in that Tracker with OOP (Modules) and Mocks.

EngineOfDarkness commented 3 years ago

I'll prioritize this over #10 because I really need to be able to test changes without all that manual labor of setting up "test" mods, starting the game, etc.

I won't get completely around that (e.g. to test if properties are read by the game) but for most things like file handling tests would be helpful.