summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-05-12 02:10:09 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-05-12 20:06:39 +0200
commite47d768d5137fc1bb771ade79ac5efadd0f93dac (patch)
tree24062dbcb3096d0060bb9420fa239b68c716de63 /TOOLS
parenta1caa001870985f36ae3c0082181e4e708ebdd73 (diff)
downloadmpv-e47d768d5137fc1bb771ade79ac5efadd0f93dac.tar.bz2
mpv-e47d768d5137fc1bb771ade79ac5efadd0f93dac.tar.xz
command-test.lua: fix some lint warnings
Fixes unused variable warnings.
Diffstat (limited to 'TOOLS')
-rw-r--r--TOOLS/lua/command-test.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/TOOLS/lua/command-test.lua b/TOOLS/lua/command-test.lua
index 877cacdeb6..a80edbd3e1 100644
--- a/TOOLS/lua/command-test.lua
+++ b/TOOLS/lua/command-test.lua
@@ -35,11 +35,11 @@ mp.observe_property("vo-configured", "bool", function(_, v)
timer:resume()
print("Slow screenshot command...")
- res, err = mp.command_native({"screenshot"})
+ res = mp.command_native({"screenshot"})
print("done, res: " .. utils.to_string(res))
print("Slow screenshot async command...")
- res, err = mp.command_native_async({"screenshot"}, function(res)
+ res = mp.command_native_async({"screenshot"}, function(res)
print("done (async), res: " .. utils.to_string(res))
timer:kill()
end)
@@ -78,13 +78,13 @@ mp.observe_property("vo-configured", "bool", function(_, v)
mp.command_native_async({name = "subprocess", args = {"wc", "-c"},
stdin_data = "hello", capture_stdout = true},
- function(res, val, err)
+ function(_, val)
print("Should be '5': " .. val.stdout)
end)
-- blocking stdin by default
mp.command_native_async({name = "subprocess", args = {"cat"},
capture_stdout = true},
- function(res, val, err)
+ function(_, val)
print("Should be 0: " .. #val.stdout)
end)
-- stdin + detached
@@ -92,7 +92,7 @@ mp.observe_property("vo-configured", "bool", function(_, v)
args = {"bash", "-c", "(sleep 5s ; cat)"},
stdin_data = "this should appear after 5s.\n",
detach = true},
- function(res, val, err)
+ function(_, val)
print("5s test: " .. val.status)
end)