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

Unified · Split

TOOLS/lua/command-test.lua+5−5
@@ -35,11 +35,11 @@ mp.observe_property("vo-configured", "bool", function(_, v) · 34 unmodified lines
35 timer:resume()35 timer:resume()
36 36
37 print("Slow screenshot command...")37 print("Slow screenshot command...")
38 res, err = mp.command_native({"screenshot"})38 res = mp.command_native({"screenshot"})
39 print("done, res: " .. utils.to_string(res))39 print("done, res: " .. utils.to_string(res))
40 40
41 print("Slow screenshot async command...")41 print("Slow screenshot async command...")
42 res, err = mp.command_native_async({"screenshot"}, function(res)42 res = mp.command_native_async({"screenshot"}, function(res)
43 print("done (async), res: " .. utils.to_string(res))43 print("done (async), res: " .. utils.to_string(res))
44 timer:kill()44 timer:kill()
45 end)45 end)
@@ -78,13 +78,13 @@ mp.observe_property("vo-configured", "bool", function(_, v) · 32 unmodified lines
78 78
79 mp.command_native_async({name = "subprocess", args = {"wc", "-c"},79 mp.command_native_async({name = "subprocess", args = {"wc", "-c"},
80 stdin_data = "hello", capture_stdout = true},80 stdin_data = "hello", capture_stdout = true},
81 function(res, val, err)81 function(_, val)
82 print("Should be '5': " .. val.stdout)82 print("Should be '5': " .. val.stdout)
83 end)83 end)
84 -- blocking stdin by default84 -- blocking stdin by default
85 mp.command_native_async({name = "subprocess", args = {"cat"},85 mp.command_native_async({name = "subprocess", args = {"cat"},
86 capture_stdout = true},86 capture_stdout = true},
87 function(res, val, err)87 function(_, val)
88 print("Should be 0: " .. #val.stdout)88 print("Should be 0: " .. #val.stdout)
89 end)89 end)
90 -- stdin + detached90 -- stdin + detached
@@ -92,7 +92,7 @@ mp.observe_property("vo-configured", "bool", function(_, v) · 1 unmodified line
92 args = {"bash", "-c", "(sleep 5s ; cat)"},92 args = {"bash", "-c", "(sleep 5s ; cat)"},
93 stdin_data = "this should appear after 5s.\n",93 stdin_data = "this should appear after 5s.\n",
94 detach = true},94 detach = true},
95 function(res, val, err)95 function(_, val)
96 print("5s test: " .. val.status)96 print("5s test: " .. val.status)
97 end)97 end)
98 98

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