Lua pushkey and getlin
Allow lua nh.pushkey to push multiple keys, make getlin return the keys in the command queue.
This commit is contained in:
@@ -121,3 +121,13 @@ for func, fval in pairs(tests) do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function test_getlin()
|
||||
nh.pushkey("AbC");
|
||||
local str = nh.getlin("What?");
|
||||
if str ~= "AbC" then
|
||||
error("nh.getlin fail, got \"" .. str .. "\"");
|
||||
end
|
||||
end
|
||||
|
||||
test_getlin();
|
||||
|
||||
Reference in New Issue
Block a user