diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2024-05-12 02:10:09 +0200 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-05-12 20:06:39 +0200 |
commit | e47d768d5137fc1bb771ade79ac5efadd0f93dac (patch) | |
tree | 24062dbcb3096d0060bb9420fa239b68c716de63 /TOOLS | |
parent | a1caa001870985f36ae3c0082181e4e708ebdd73 (diff) | |
download | mpv-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.lua | 10 |
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) |