ox 0.2.5 (new formula)

Closes #63915.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: chenrui <chenrui333@gmail.com>
master
Dario Vladovic 2020-11-01 22:06:29 +01:00 committed by chenrui
parent 35a960daad
commit c782d6949a
1 changed files with 29 additions and 0 deletions

29
Formula/ox.rb Normal file
View File

@ -0,0 +1,29 @@
class Ox < Formula
desc "Independent Rust text editor that runs in your terminal"
homepage "https://github.com/curlpipe/ox"
url "https://github.com/curlpipe/ox/archive/0.2.5.tar.gz"
sha256 "873eb447029508bc3fd1d7dda8803d79a7b107a7a903399947f4eac6ae671176"
license "GPL-2.0-only"
head "https://github.com/curlpipe/ox.git"
depends_on "rust" => :build
def install
system "cargo", "install", *std_cargo_args
end
test do
require "pty"
_, w, pid = PTY.spawn(bin/"ox", "test.txt")
sleep 1
w.write "Hello Homebrew!\n"
w.write "\cS"
sleep 1
w.write "\cQ"
assert_match "Hello Homebrew!\n", (testpath/"test.txt").read
ensure
Process.kill("TERM", pid)
end
end