Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

with-readline 0.1.1 (new formula) #33454

Closed

Conversation

alephnull
Copy link
Contributor

Adds a formula for with-readline which adds readline support to tools
that don't have readline support like the OSX native sftp.

This depends on readline and fooling about with {C,LD}FLAGS was the
way I figured out to make this build. Criticism appreciated.


test do
# Some test is better than no test
system bin/"with-readline", "--version"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try and run an internal OS X command that doesn't have readline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test readline functionality, I need to figure out how to do interactive (like expect) in Ruby. I could just run with-readline sftp for example but that tells me no more than --version. I have however put in a test with the OSX-provided expect which does not link with readline.

@alephnull
Copy link
Contributor Author

@mistydemeo I stand corrected. readline builds and installs correctly without setting flags. Pushed updated formula. Thanks for the help and the patience.

Adds a formula for with-readline which adds readline support to tools
that don't have readline support like the OSX native sftp.
test do
# Some test is better than no test
system bin/"with-readline", "--version"
system bin/"echo 'exit' | with-readline expect"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test actually fails silently:

==> /usr/local/Cellar/with-readline/0.1.1/bin/echo 'exit' | with-readline expect
sh: /usr/local/Cellar/with-readline/0.1.1/bin/echo: No such file or directory

You can write this as system "echo 'exit' | #{bin}/with-readline /usr/bin/expect"

@MikeMcQuaid
Copy link
Member

Pulled and test improved in 3cb2e79.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants