myk002
12315fc5dd
wrap dfhack.run_script for tests
...
so dfhack.internal.scripts isn't polluted with IN_TEST envs
2021-04-06 11:33:49 -07:00
myk002
642d8cbe4b
handle nil values sent to printerr
2021-04-05 01:37:43 -07:00
myk002
13ca7f8c9e
move expect.lua from internal/ to test_util/
2021-04-04 17:37:37 -07:00
myk002
c8abecd082
detect dfhack.printerr usage at the test level
...
not the expect level. this allows us to properly nest expect calls
inside of expect.printerr_match() as originally intended.
2021-04-04 17:37:36 -07:00
myk002
5af1b627cb
add tests, move expect.lua
...
I moved expect.lua from library/lua/test/ to library/lua/internal since
luacov is configured to ignore any file with /test/ in its path
2021-04-04 17:37:36 -07:00
myk002
a6561911c1
error on unmatched printerr output during a test
...
- provides expect,printerr_match for matching printerr output
- fails tests if printerr is called outside the printerr_match wrapper
- changes api of expect.error_match to mirror the new printerr_match api
2021-04-04 17:37:33 -07:00
myk002
d71a816b20
remove debug marker
2021-03-29 12:28:19 -07:00
myk002
54a1e8d98a
move script_environment changes to test.lua
2021-03-29 12:23:53 -07:00
myk002
e4cab1b1c6
load scripts into different namespace for testing
2021-03-29 11:26:28 -07:00
myk002
8ccacd94e0
clarify clean_reqscript() function comment
2021-03-28 15:41:05 -07:00
myk002
035c9eec04
force reloading of scripts under test
...
and invalidate scripts once tests are complete. this ensures that the
IN_TEST flag is respected.
2021-03-28 15:40:59 -07:00
lethosor
62776f5568
Move `expect` functions to a separate file
...
This allows tests to test these functions without needing to include the test
wrapper directly (now ci/test.lua, formerly test/main.lua). Hopefully this
location is also more stable, similar to other libraries that are already tested.
2021-03-24 00:48:52 -04:00
lethosor
29a396ba54
Merge branch 'develop' into myk_move_main
2021-03-23 22:17:36 -04:00
myk002
a9192ebe12
update docs with new script path
2021-03-22 11:09:44 -07:00
myk002
5f00183177
move test harness out of test dir
...
and install to test.lua in top-level scripts directory instead of test/main.lua
2021-03-22 10:15:32 -07:00