summaryrefslogtreecommitdiffstats
path: root/TOOLS/lua/command-test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'TOOLS/lua/command-test.lua')
-rw-r--r--TOOLS/lua/command-test.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/TOOLS/lua/command-test.lua b/TOOLS/lua/command-test.lua
index 79c1127cbf..dd384818cc 100644
--- a/TOOLS/lua/command-test.lua
+++ b/TOOLS/lua/command-test.lua
@@ -65,6 +65,18 @@ mp.observe_property("vo-configured", "bool", function(_, v)
mp.abort_async_command(x)
end)
+ -- (assuming this "freezes")
+ local y = mp.command_native_async({name = "sub-add", url = "-"},
+ function(res, val, err)
+ print("done sub-add stdin: " .. join(" ", {res, val, err}))
+ end)
+ mp.add_timeout(20, function()
+ print("aborting sub-add stdin after timeout")
+ mp.abort_async_command(y)
+ end)
+
+
+
-- This should get killed on script exit.
mp.command_native_async({name = "subprocess", playback_only = false,
args = {"sleep", "inf"}}, function()end)