有Ruby的Expect等效宝石吗? [英] Is there an Expect equivalent gem for Ruby?

查看:57
本文介绍了有Ruby的Expect等效宝石吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ruby是否有与Expect相当的宝石?

Is there an Expect equivalent gem for Ruby?

我尝试在code.google和rubygems.org上搜索,但不幸的是它没有显示.

I tried searching on code.google and rubygems.org, but sadly it did not show up.

FYI:期望是Unix自动化和测试工具,由Don Libes编写,作为Tcl脚本语言的扩展,用于诸如telnet,f​​tp,passwd,fsck,rlogin,tip,ssh等交互式应用程序.

FYI: Expect is a Unix automation and testing tool, written by Don Libes as an extension to the Tcl scripting language, for interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, ssh, and others.

推荐答案

Ruby随附 PTY 模块,用于设置伪终端以驱动交互式命令行应用程序.随之而来的是 expect方法,允许您与期望"之类的应用程序进行交互.为了学习如何使用期望,我发现"从Ruby期望库中获得什么?有帮助.

Ruby comes with the PTY module for setting up pseudoterminals to drive interactive command line applications. With it comes an expect method that allows you to interact with an application kinda like Expect. For learning how to use expect, I found "What to expect from the Ruby expect library?" helpful.

就宝石而言,也许结帐 greenletters 可以改善PTY +期望(尽管我自己还没有尝试过.)

As far as gems go, maybe checkout greenletters which is supposed to improve upon PTY + expect (although I haven't tried it myself).

这篇关于有Ruby的Expect等效宝石吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆