History

command-test.lua: fix some lint warnings

Fixes unused variable warnings.

Kacper Michajłow committed 2 years ago

Commit e47d7681 parent a1caa001 file · +5 −5Browse files

Showing the changes to TOOLS/lua/command-test.lua (1 of 1 file). Show all

Unified · Split

TOOLS/lua/command-test.lua+5−5
@@ -35,11 +35,11 @@ mp.observe_property("vo-configured", "bool", function(_, v) · 34 unmodified lines
3535 timer:resume()
3636
3737 print("Slow screenshot command...")
38− res, err = mp.command_native({"screenshot"})
38+ res = mp.command_native({"screenshot"})
3939 print("done, res: " .. utils.to_string(res))
4040
4141 print("Slow screenshot async command...")
42− res, err = mp.command_native_async({"screenshot"}, function(res)
42+ res = mp.command_native_async({"screenshot"}, function(res)
4343 print("done (async), res: " .. utils.to_string(res))
4444 timer:kill()
4545 end)
@@ -78,13 +78,13 @@ mp.observe_property("vo-configured", "bool", function(_, v) · 32 unmodified lines
7878
7979 mp.command_native_async({name = "subprocess", args = {"wc", "-c"},
8080 stdin_data = "hello", capture_stdout = true},
81− function(res, val, err)
81+ function(_, val)
8282 print("Should be '5': " .. val.stdout)
8383 end)
8484 -- blocking stdin by default
8585 mp.command_native_async({name = "subprocess", args = {"cat"},
8686 capture_stdout = true},
87− function(res, val, err)
87+ function(_, val)
8888 print("Should be 0: " .. #val.stdout)
8989 end)
9090 -- stdin + detached
@@ -92,7 +92,7 @@ mp.observe_property("vo-configured", "bool", function(_, v) · 1 unmodified line
9292 args = {"bash", "-c", "(sleep 5s ; cat)"},
9393 stdin_data = "this should appear after 5s.\n",
9494 detach = true},
95− function(res, val, err)
95+ function(_, val)
9696 print("5s test: " .. val.status)
9797 end)
9898

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t