Commit Graph

316 Commits (17017bb526d7b0ffdbe51e0831c81104693fc379)

Author SHA1 Message Date
lethosor 898d4621da
Merge remote-tracking branch 'myk002/myk_view_unit' into develop 2021-07-05 20:42:49 -04:00
myk002 87c7d02e09
support view unit mode for guidm.enterSidebarMode 2021-07-05 16:02:19 -07:00
myk002 17d4be14f3
fix formatting of coords error message 2021-07-05 16:01:07 -07:00
myk002 f62ff3ecc0
migrate existing lua code to use new library fns 2021-07-05 15:48:51 -07:00
lethosor 2f36404da7
Merge remote-tracking branch 'origin/lua_label_input_fix' into develop 2021-07-05 15:42:06 -04:00
lethosor 3e6cecbbc6
Merge remote-tracking branch 'myk002/myk_argparse' into develop 2021-07-05 15:21:59 -04:00
lethosor fb7560d8bf
Merge remote-tracking branch 'wolfboyft/patch-2' into develop 2021-07-05 11:41:37 -04: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 3a8f564cd2
forward old processArgs fns to new locations 2021-07-02 23:21:40 -07:00
myk002 9535ff82bb
add argparse library functions 2021-07-02 23:11:17 -07: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
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 1b167e7898
Also add quotes in expect.ne()
Extension of #1886
2021-06-24 01:15:15 -04:00
lethosor 72998cddd5
Merge remote-tracking branch 'myk002/myk_expect_quotes' into develop 2021-06-24 01:11:21 -04:00
myk002 67840c033c
add quotes around printed unequal values
so you can see confusing hidden trailing spaces
2021-06-23 14:04:16 -07: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
Warmist b7069a5ebd
Fix label early key detection in scrolling logic
Current logic is because @myk002 fixed it so label would allow other widgets control when label(s) are present. However that breaks label key detection for default scroll keys. This can be worked around by setting scrollkeys to empty.

TBH: label is quite complicated and used everwhere so i'm reluctant to touch it and would love for someone to look over if i'm correct.
2021-06-22 11:31:00 +03:00
Tachytaenius 990c153a9a
Show adjective in item prompt
Useful for high boot/low boot etc.
2021-06-19 13:59:38 +01:00
myk002 b7a970a309
allow mock.func() to return multiple values 2021-06-15 13:16:05 -07: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 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 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 4e844f39ae
undo formatting change in script_environment 2021-03-29 12:29:15 -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
lethosor 2332009825
Merge remote-tracking branch 'myk002/myk_enable_luacov' into develop 2021-03-28 00:38:36 -04:00
lethosor 5e09fd882d
Fix Painter:viewport()
This works because Painter inherits from ViewRect. Unsure how this went unnoticed.
2021-03-27 16:55:48 -04: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
myk002 754baa45b3
remove io overrides
they were causing side effects when writing luacov reports
2021-03-07 08:16:24 -08:00
myk002 ba6a02eb59
call luacov.runner.init directly and clean up dbg 2021-03-07 08:16:24 -08:00
myk002 418a8c5d21
propagate luacov debug hook through coroutines 2021-03-07 08:16:24 -08:00
lethosor 7e12f3fd3d
Fix off-by-one, adjust changelog, move scroll keys to consistent place
Ref #1748
2021-01-30 19:40:15 -05:00
lethosor 8967e98a33
Merge remote-tracking branch 'myk002/myk_scrollable_labels' into develop 2021-01-30 19:33:04 -05:00
lethosor 4126585573
Merge remote-tracking branch 'lethosor/lua-runcommand' into develop 2021-01-29 20:27:38 -05:00
lethosor de6f9183fd
Fix changelog, replace a couple qerror calls with error
Ref #1746
2021-01-29 00:04:10 -05:00
myk002 5a2181d55e
don't render overflow text 2021-01-13 22:02:22 -08:00
myk002 39d274b00e
address review comments 2021-01-12 23:42:53 -08:00
myk002 d4fbf4261f
address review comments 2021-01-12 23:27:14 -08:00