public io.vertx.rxjava.ext.shell.command.CommandProcess resizehandler(Handler<Void> handler) { delegate.resizehandler(handler); return this; }
public io.vertx.rxjava.ext.shell.command.CommandProcess resizehandler(Handler<Void> handler) { delegate.resizehandler(handler); return this; }
windowCmd.processHandler(process -> { process.write("[" + process.width() + "," + process.height() + "]\n"); process.resizehandler(v -> { process.write("[" + process.width() + "," + process.height() + "]\n"); });
@Test public void testResize(TestContext context) { commands.add(CommandBuilder.command("foo").processHandler(process -> { context.assertEquals(20, process.width()); context.assertEquals(10, process.height()); process.resizehandler(v -> { context.assertEquals(25, process.width()); context.assertEquals(15, process.height()); process.end(0); }); process.write("ping"); })); Shell shell = server.createShell(); Job job = shell.createJob("foo"); Pty pty = Pty.create(); Async async = context.async(); pty.setSize(20, 10); pty.stdoutHandler(text -> { pty.setSize(25, 15); }); job.setTty(pty.slave()).statusUpdateHandler(CommandProcessTest.terminateHandler(status -> { async.complete(); })).run(); }