lethosor
898d4621da
Merge remote-tracking branch 'myk002/myk_view_unit' into develop
2021-07-05 20:42:49 -04:00
myk002
f1bcf0c7b5
make dwarfmode test not require autocorrection
2021-07-05 16:05:12 -07:00
myk002
4eb8870797
add unit tests
2021-07-05 16:02:19 -07:00
myk002
5e0672902c
fix parse_gui_commandline test when run on title
2021-07-05 16:01:23 -07:00
myk002
0ef5134a33
add optional coordinate validation to coords
2021-07-04 07:32:29 -07:00
myk002
56a1c8b4d5
coordinates can be 0
2021-07-03 16:26:39 -07:00
myk002
aefb893daa
remove redundant tests
2021-07-02 23:29:02 -07:00
myk002
9535ff82bb
add argparse library functions
2021-07-02 23:11:17 -07:00
lethosor
f9627a0cfb
Add another split() test for pattern delimiters
2021-07-03 00:33:28 -04:00
lethosor
da3b522061
Enable string.split() tests
...
Ref #1888 (step 4)
2021-07-03 00:31:19 -04:00
myk002
36b2d05ff6
add dfhack string functions and tests
...
added string:split
added string:trim
added a default value for wrap width
added function comments
added tests for all string functions (the tests for string:split will be commented out until we remove the competing implementation in gui/load-screen
2021-07-02 13:21:54 -07:00
lethosor
3a7306eb03
Restrict orders tests to fortress mode
2021-06-30 23:18:53 -04:00
lethosor
75bf013c7f
Add more "orders import" tests
...
The invalid-after-valid test fails
2021-06-30 23:15:56 -04:00
lethosor
5686272c91
Add tests for "orders import"
...
A couple crashes have resulted from invalid orders JSON files - this should
help catch any regressions with error handling.
See #1770 , #1893 , #1894
2021-06-30 23:01:51 -04:00
myk002
eafa6e86f7
add utils.normalizePath()
2021-06-29 12:22:05 -07:00
lethosor
e070f4d9d8
Merge remote-tracking branch 'myk002/myk_sidebar' into develop
2021-06-28 01:03:13 -04:00
lethosor
4945018e92
Merge remote-tracking branch 'myk002/myk_multi_mock' into develop
2021-06-25 01:27:46 -04:00
lethosor
0297a5b1b8
Check some more cases, especially empty strings
2021-06-24 00:42:50 -04:00
myk002
5b12c64cba
add new string function: wrap()
...
refactored and improved from the implementation in quickfort's dialog.lua
2021-06-23 13:59:39 -07:00
myk002
000b589e3a
add dwarfmode library function: enterSidebarMode()
...
refactored from quickfort. this common implementation will replace the
now redundant functions in quickfort, gui/mass-remove, and gui/blueprint
2021-06-23 12:29:37 -07:00
myk002
b7a970a309
allow mock.func() to return multiple values
2021-06-15 13:16:05 -07:00
myk002
1b1b4245c9
report output filenames when creating blueprints
...
also refactor so we can get this data from gui/blueprint
2021-05-31 15:34:19 -07:00
myk002
1aaed3a6ed
error on invalid phase names
2021-05-21 06:34:28 -07:00
myk002
95d97b929e
remove unit tests for removed function
2021-05-15 05:59:37 -07:00
myk002
816cd5cf27
add unit tests
2021-05-10 21:11:13 -07:00
Myk
654b3e9c56
Merge branch 'develop' into myk_negative_number_params
2021-05-09 21:46:07 -07:00
lethosor
4968d97c22
test/structures/find: avoid overwriting other potential config values
2021-05-08 22:12:07 -04:00
myk002
59b08e99f6
fix -- handling and required arg detection
2021-05-07 15:21:45 -07:00
myk002
fd735d4b42
treat negative numbers as non-options in getopt
2021-05-07 15:21:45 -07:00
lethosor
403f822520
Add tests for patch() where patching raises an error
2021-04-17 00:59:56 -04:00
lethosor
ee8e10429d
Add initial implementation of mock.restore()
...
Like mock.patch() but only restores original values instead of also setting
new values initially.
2021-04-16 00:34:46 -04:00
lethosor
757736728d
Add a mock.func() helper for mocking functions
2021-04-10 01:22:03 -04:00
lethosor
5424392273
mock.patch(): propagate return values
2021-04-09 00:41:39 -04:00
lethosor
f25b8a0d14
Fix patching value with nil
2021-04-09 00:35:54 -04:00
lethosor
7b2f01d45b
Add initial mock.patch() implementation for tests
2021-04-09 00:32:10 -04: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
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
757dbeb238
update existing calls to expect.error* to new API
2021-04-04 17:37:36 -07:00
Ben Lubar
c06d1f8e52
tagged union support for lua ( #1818 )
2021-03-30 15:55:06 -05: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
lethosor
9a29e5f1ce
Make "test file failed to load" errors more obvious, and make run-tests.py fail
...
These errors could previously go undetected, since they were easy to miss at the
end of the output and did not cause run-tests.py to fail.
This change adds a `*` pseudo-entry to test_status.json, which is set to
"failed" if any tests failed *or* failed to load. This avoids the need to change
run-tests.py, which is cached on Buildmaster.
See #1815
2021-03-23 22:11:48 -04:00
lethosor
e9efa6c961
Update xml, fix + improve robustness of unions.lua unit tests
...
- unit_action_fields(): handled primitive union members correctly
- unit_action_type(): added messages to make failures easier to diagnose
- Also removed redundant checks that effectively checked that
`enum.attrs[k] == enum.attrs[v]` - this is out of scope of union tests
2021-03-23 21:24:57 -04: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
myk002
3e5a2c8d7c
rerun all tests by default
...
introduce and use --resume option for ci
2021-03-22 10:06:03 -07:00
lethosor
120a359d6f
Fix typo
2021-03-20 13:29:30 -04:00
myk002
403ba2b8ea
work when there is no done_command
2021-03-07 12:06:48 -08:00
myk002
98b67e170d
allow done_command to be set in test_config.json
2021-03-07 08:51:02 -08:00
myk002
dc5fe71caf
add more help and improve compatibility
...
- explain modes, done command, and test_config.json file format
- also be more flexible with how the done command is formatted (can now be
passed as either separate tokens or as a single quoted string)
- print the filter values when filtering tests
2021-03-07 08:24:18 -08:00