homebrew-core/Formula/ydcv.rb
2017-10-30 03:49:11 -07:00

20 lines
580 B
Ruby

class Ydcv < Formula
desc "YouDao Console Version"
homepage "https://github.com/felixonmars/ydcv"
url "https://github.com/felixonmars/ydcv/archive/0.4.tar.gz"
sha256 "2d9f6309bbf2d35c0c34c5ee945cf40769cc8201e6f374fa2a4f2d4b827fbdbb"
bottle :unneeded
depends_on :python if MacOS.version <= :snow_leopard
def install
bin.install "ydcv.py" => "ydcv"
zsh_completion.install "contrib/zsh_completion" => "_ydcv"
end
test do
assert_match "hello", shell_output("#{bin}/ydcv 你好")
assert_match "你好", shell_output("#{bin}/ydcv hello")
end
end