aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-03-13 17:33:34 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-03-13 17:33:34 -0400
commit753b949ae0ff0f574a7a8247ff936be623d815c3 (patch)
treed7caf986f29b92c11677a8ed480f53ca8367dc5b /test
parent2bf12e0e8ca11e37277a12123d5f6b5045d9c781 (diff)
More code cleanup, refactoring, and reformatting.
Diffstat (limited to 'test')
-rw-r--r--test/test.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test.lua b/test/test.lua
index b0d035b5..a4760039 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -29,7 +29,7 @@ function assert_equal(v1, v2)
end
::continue::
end
- error(string.format('%s ~= %s', tostring(v1), tostring(v2)), 2)
+ error(string.format('%s ~= %s', v1, v2), 2)
end
@@ -2183,6 +2183,8 @@ function test_menu_functions_interactive()
io.close_buffer()
end
+-- TODO: test set arguments more thoroughly.
+
function test_menu_select_command_interactive()
local num_buffers = #_BUFFERS
textadept.menu.select_command()
@@ -2259,6 +2261,7 @@ function test_run_build()
textadept.run.build_commands[_HOME] = function()
return 'lua modules/textadept/run/build.lua', _HOME .. '/test/' -- intentional trailing '/'
end
+ textadept.run.stop() -- should not do anything
textadept.run.build(_HOME)
if #_VIEWS > 1 then view:unsplit() end
assert_equal(buffer._type, _L['[Message Buffer]'])
@@ -2272,6 +2275,7 @@ function test_run_build()
assert(buffer:get_text():find('build%.lua'), 'did not run build command')
assert(buffer:get_text():find('read "foo"'), 'did not send stdin')
assert(buffer:get_text():find('> exit status: 9'), 'build not stopped')
+ textadept.run.stop() -- should not do anything
io.close_buffer()
-- TODO: chdir(_HOME) and textadept.run.build() -- no param.
-- TODO: project whose makefile is autodetected.